From 545f578097abad5663123f6b86d7a6ba2f3093ab Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 14 Apr 2008 17:36:09 +0000 Subject: [PATCH] code before declaration git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8111 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index bf66fe3468..9eebc52ac4 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1452,13 +1452,14 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu 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