[Freeswitch-svn] [commit] r3053 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Sun Oct 15 01:20:50 EDT 2006


Author: mikej
Date: Sun Oct 15 01:20:49 2006
New Revision: 3053

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c

Log:
add tport_log redirect, fix typo.

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Sun Oct 15 01:20:49 2006
@@ -77,6 +77,8 @@
 #include <sofia-sip/su_log.h>
 #include <sofia-sip/nea.h>
 
+extern su_log_t tport_log[];
+
 static char reg_sql[] =
 "CREATE TABLE sip_registrations (\n"
 "   user            VARCHAR(255),\n"
@@ -3741,6 +3743,8 @@
 			char *val = (char *) switch_xml_attr_soft(param, "value");
 			if (!strcasecmp(var, "log-level")) {
 				su_log_set_level(NULL, atoi(val));
+			} else if (!strcasecmp(var, "log-level-trace")) {
+				su_log_set_level(tport_log, atoi(val));
 			}
 		}
 	}
@@ -4183,7 +4187,7 @@
     for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
         switch_hash_this(hi, NULL, NULL, &val);
         profile = (sofia_profile_t *) val;
-        if (!(profile->pflags && PFLAG_PRESENCE)) {
+        if (!(profile->pflags & PFLAG_PRESENCE)) {
 			continue;
         }
 
@@ -4224,7 +4228,8 @@
 
 	su_init();
 	su_log_redirect(NULL, logger, NULL);
-	
+	su_log_redirect(tport_log, logger, NULL);
+
 	switch_core_hash_init(&globals.profile_hash, module_pool);
 	switch_mutex_init(&globals.hash_mutex, SWITCH_MUTEX_NESTED, module_pool);
 



More information about the Freeswitch-svn mailing list