From d14bffeed74dcdeaefc4431ae2006e44b7ee061d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 27 Jan 2010 21:08:11 +0000 Subject: [PATCH] exec sql stmt sooner to prevent race git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16525 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_presence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index a7f952ca97..97e057ba35 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -2320,14 +2320,14 @@ void sofia_presence_handle_sip_i_publish(nua_t *nua, sofia_profile_t *profile, n " and profile_name='%q' and hostname='%q'", from_user, from_host, profile->name, mod_sofia_globals.hostname ))) { - sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE); + sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE); } if ((sql = switch_mprintf("insert into sip_presence (sip_user, sip_host, status, rpid, expires, user_agent, profile_name, hostname) " "values ('%q','%q','%q','%q',%ld,'%q','%q','%q')", from_user, from_host, note_txt, rpid, exp, full_agent, profile->name, mod_sofia_globals.hostname))) { - sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE); + sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE); } event_type = sip_header_as_string(profile->home, (void *) sip->sip_event);