exec sql stmt sooner to prevent race

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16525 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2010-01-27 21:08:11 +00:00
parent 0549eee174
commit d14bffeed7
1 changed files with 2 additions and 2 deletions

View File

@ -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);