]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Wed May 7 10:08:17 EDT 2008 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Fri, 9 May 2008 17:44:46 +0000 (17:44 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 9 May 2008 17:44:46 +0000 (17:44 +0000)
  * nua: improved logging, fixed macro expansion on __LINE__ on most compilers

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8335 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h

index 559219014e5c80b585f51d591a86718365574026..b8cc0bedd38232b7612f313d64f5c312bc899a9f 100644 (file)
@@ -1 +1 @@
-Fri May  9 13:43:35 EDT 2008
+Fri May  9 13:44:20 EDT 2008
index 9806a7570cdcd06b846d626572937dbfeac33fd0..97c3bb3930459b1bc70812c5b77cfa42fb22f382 100644 (file)
@@ -511,12 +511,19 @@ int nua_signal(nua_t *nua, nua_handle_t *nh, msg_t *msg,
     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 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_ee_data_t *ee)
     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 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_ee_data_t *ee)
   }
 
   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);
index cd08e46127106ae022992f66861de84c9b417494..68da7a43d56a14071a763114bd4dbf1957aa29fe 100644 (file)
@@ -207,7 +207,8 @@ typedef struct nua_event_frame_s nua_event_frame_t;
 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];