doh
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7905 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
14ca1f4463
commit
1dafa06daa
|
@ -436,6 +436,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_worker_thread_run(switch_thread_t *thread
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -2503,16 +2503,18 @@ void sofia_glue_execute_sql(sofia_profile_t *profile, char **sqlp, switch_bool_t
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue