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

Freeswitch SVN mikej at freeswitch.org
Fri May 9 13:44:46 EDT 2008


Author: mikej
Date: Fri May  9 13:44:46 2008
New Revision: 8335

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

Log:
Wed May  7 10:08:17 EDT 2008  Pekka Pessi <first.last at nokia.com>
  * nua: improved logging, fixed macro expansion on __LINE__ on most compilers



Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Fri May  9 13:44:46 2008
@@ -1 +1 @@
-Fri May  9 13:43:35 EDT 2008
+Fri May  9 13:44:20 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c	Fri May  9 13:44:46 2008
@@ -511,12 +511,19 @@
     e->e_status = status;
     e->e_phrase = phrase;
 
-    SU_DEBUG_7(("nua(%p): signal %s\n", (void *)nh,
-		nua_event_name(event) + 4));
-
     su_msg_deinitializer(sumsg, nua_event_deinit);
       
     retval = su_msg_send_to(sumsg, nua->nua_server, nua_stack_signal);
+
+    if (retval == 0){
+      SU_DEBUG_7(("nua(%p): %s signal %s\n", (void *)nh,
+		  "sent", nua_event_name(event) + 4));
+    }
+    else {
+      SU_DEBUG_0(("nua(%p): %s signal %s\n", (void *)nh,
+		  "FAILED TO SEND", nua_event_name(event) + 4));
+
+    }
   }
 
   ta_end(ta);
@@ -552,9 +559,9 @@
     char const *name = nua_event_name(e->e_event);
 
     if (e->e_status == 0)
-      SU_DEBUG_5(("nua(%p): signal %s\n", (void *)nh, name + 4));
+      SU_DEBUG_5(("nua(%p): %s signal %s\n", (void *)nh, "recv", name + 4));
     else
-      SU_DEBUG_5(("nua(%p): signal %s %u %s\n",
+      SU_DEBUG_5(("nua(%p): recv signal %s %u %s\n",
 		  (void *)nh, name + 4,
 		  e->e_status, e->e_phrase ? e->e_phrase : ""));
   }
@@ -651,7 +658,8 @@
   }
 
   if (error < 0) {
-    nua_stack_event(nh->nh_nua, nh, NULL, event, NUA_ERROR_AT(__FILE__, __LINE__), NULL);
+    nua_stack_event(nh->nh_nua, nh, NULL, event,
+		    NUA_ERROR_AT(__FILE__, __LINE__), NULL);
   }
 
   su_msg_destroy(nua->nua_signal);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h	Fri May  9 13:44:46 2008
@@ -207,7 +207,8 @@
 extern char const nua_internal_error[];
 
 #define NUA_INTERNAL_ERROR 900, nua_internal_error
-#define NUA_ERROR_AT(file, line) 900, "Internal error at " file ":" #line
+#define _NUA_INTERNAL_ERROR_AT(file, line) "Internal error at " file ":" #line
+#define NUA_ERROR_AT(file, line) 900, _NUA_INTERNAL_ERROR_AT(file, line)
 
 struct nua_s {
   su_home_t            nua_home[1];



More information about the Freeswitch-svn mailing list