[Freeswitch-svn] [commit] r4775 - freeswitch/trunk/libs/libdingaling/src

Freeswitch SVN mikej at freeswitch.org
Tue Mar 27 01:15:16 EDT 2007


Author: mikej
Date: Tue Mar 27 01:15:16 2007
New Revision: 4775

Modified:
   freeswitch/trunk/libs/libdingaling/src/libdingaling.c

Log:
use logger for iksemel logs too instead of stderr.

Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c	(original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c	Tue Mar 27 01:15:16 2007
@@ -1218,15 +1218,12 @@
 
 static void on_log(ldl_handle_t *handle, const char *data, size_t size, int is_incoming)
 {
-	if (iks_is_secure(handle->parser)) {
-		fprintf(stderr, "Sec");
+	if (globals.debug) {
+		globals.logger(DL_LOG_DEBUG, "\n%s%s[%s]\n", 
+			iks_is_secure(handle->parser) ? "Sec" : "",
+			is_incoming ? "RECV" : "SEND",
+			data);
 	}
-	if (is_incoming) {
-		fprintf(stderr, "RECV");
-	} else {
-		fprintf(stderr, "SEND");
-	}
-	fprintf(stderr, "[%s]\n", data);
 }
 
 static void j_setup_filter(ldl_handle_t *handle)



More information about the Freeswitch-svn mailing list