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

Freeswitch SVN anthm at freeswitch.org
Mon Apr 14 13:36:09 EDT 2008


Author: anthm
Date: Mon Apr 14 13:36:09 2008
New Revision: 8111

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

Log:
code before declaration

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 Apr 14 13:36:09 2008
@@ -1452,13 +1452,14 @@
 									  nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sofia_private_t *sofia_private, sip_t const *sip, tagi_t tags[])
 {
 	if ((profile->pflags & PFLAG_UNREG_OPTIONS_FAIL) && status != 200 && sip && sip->sip_to) {
+		char *sql;
 		time_t now = switch_timestamp(NULL);
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Expire registration '%s@%s' due to options failure\n", 
 						  sip->sip_to->a_url->url_user,
 						  sip->sip_to->a_url->url_host
 						  );
 
-		char *sql = switch_mprintf("update sip_registrations set expired=%ld where sip_user='%s' and sip_host='%s'", 
+		sql = switch_mprintf("update sip_registrations set expired=%ld where sip_user='%s' and sip_host='%s'", 
 								   (long)now,
 								   sip->sip_to->a_url->url_user,
 								   sip->sip_to->a_url->url_host



More information about the Freeswitch-svn mailing list