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

Freeswitch SVN anthm at freeswitch.org
Mon Mar 17 13:43:25 EDT 2008


Author: anthm
Date: Mon Mar 17 13:43:25 2008
New Revision: 7905

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

Log:
doh

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Mon Mar 17 13:43:25 2008
@@ -436,6 +436,7 @@
 			void *pop;
 			switch_mutex_lock(profile->ireg_mutex);
 			while (switch_queue_trypop(profile->sql_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
+				printf("WTF [%s]\n", (char *)pop);
 				sofia_glue_actually_execute_sql(profile, SWITCH_TRUE, (char *) pop, NULL);
 				free(pop);
 			}

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Mon Mar 17 13:43:25 2008
@@ -2503,16 +2503,18 @@
 		}
 
 		switch_assert(d_sql);
-		status = switch_queue_trypush(profile->sql_queue, d_sql);
+		if ((status = switch_queue_trypush(profile->sql_queue, d_sql)) == SWITCH_STATUS_SUCCESS) {
+			d_sql = NULL;
+		}
 	} else if (sql_already_dynamic) {
 		d_sql = sql;
 	}
-	
+
 	if (status != SWITCH_STATUS_SUCCESS) {
 		sofia_glue_actually_execute_sql(profile, SWITCH_FALSE, sql, profile->ireg_mutex);
 	}
 
-	switch_safe_free(d_sql);		
+	switch_safe_free(d_sql);
 
 	if (sql_already_dynamic) {
 		*sqlp = NULL;



More information about the Freeswitch-svn mailing list