[Freeswitch-svn] [commit] r8640 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nua

Freeswitch SVN mikej at freeswitch.org
Sun May 25 11:23:36 EDT 2008


Author: mikej
Date: Sun May 25 11:23:36 2008
New Revision: 8640

Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c

Log:
Thu May 22 10:57:40 EDT 2008  Pekka.Pessi at nokia.com
  * nua_register.c: fixed klocwork issues


Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Sun May 25 11:23:36 2008
@@ -1 +1 @@
-Sun May 25 11:23:06 EDT 2008
+Sun May 25 11:23:32 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c	Sun May 25 11:23:36 2008
@@ -188,7 +188,7 @@
 				  nua_dialog_state_t *ds,
 				  nua_dialog_usage_t *du)
 {
-  nua_registration_t *nr = nua_dialog_usage_private(du);
+  nua_registration_t *nr = NUA_DIALOG_USAGE_PRIVATE(du);
 
   if (ds->ds_has_register)
     return -1;			/* There can be only one usage */
@@ -207,7 +207,7 @@
 				      nua_client_request_t *cr,
 				      nua_server_request_t *sr)
 {
-  nua_registration_t *nr = nua_dialog_usage_private(du);
+  nua_registration_t *nr = NUA_DIALOG_USAGE_PRIVATE(du);
 
   if (nr->nr_list)
     nua_registration_remove(nr);	/* Remove from list of registrations */
@@ -236,7 +236,7 @@
 					 nua_dialog_state_t const *ds,
 					 sip_t const *sip)
 {
-  nua_registration_t *nr = nua_dialog_usage_private(du);
+  nua_registration_t *nr = NUA_DIALOG_USAGE_PRIVATE(du);
   if (nr->nr_ob)
     outbound_peer_info(nr->nr_ob, sip);
 }
@@ -1016,16 +1016,18 @@
 				    msg_t *msg,
 				    int error)
 {
-  nua_dialog_usage_t *du = nua_dialog_usage_public(nr);
+  nua_dialog_usage_t *du;
   tp_name_t const *tpn;
-  int pending = nr->nr_error_report_id;
+  int pending;
 
-  assert(tport == nr->nr_tport);
-
-  if (!nr->nr_tport)
+  assert(nr && tport == nr->nr_tport);
+  if (nr == NULL || tport != nr->nr_tport)
     return;
 
-  if (tport_release(nr->nr_tport, pending, NULL, NULL, nr, 0) < 0)
+  du = NUA_DIALOG_USAGE_PUBLIC(nr);
+  pending = nr->nr_error_report_id;
+
+  if (tport_release(tport, pending, NULL, NULL, nr, 0) < 0)
     SU_DEBUG_1(("nua_register: tport_release() failed\n"));
   nr->nr_error_report_id = 0;
 
@@ -1110,7 +1112,7 @@
 				       nua_dialog_usage_t *du)
 {
   nua_client_request_t *cr = du->du_cr;
-  nua_registration_t *nr = nua_dialog_usage_private(du);
+  nua_registration_t *nr = NUA_DIALOG_USAGE_PRIVATE(du);
 
   if (cr) {
     if (nua_client_is_queued(cr)) /* Already registering. */



More information about the Freeswitch-svn mailing list