mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 20:27:19 +00:00
begin and commit in sep stmts
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15462 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ddc6612675
commit
5dfcff4303
@ -915,8 +915,9 @@ void *SWITCH_THREAD_FUNC sofia_profile_worker_thread_run(switch_thread_t *thread
|
|||||||
|
|
||||||
switch_mutex_lock(profile->ireg_mutex);
|
switch_mutex_lock(profile->ireg_mutex);
|
||||||
|
|
||||||
sprintf(sqlbuf + len, "begin;\n");
|
|
||||||
len += 7;
|
sprintf(sqlbuf, "begin;\n");
|
||||||
|
sofia_glue_actually_execute_sql(profile, sqlbuf, NULL);
|
||||||
|
|
||||||
while (switch_queue_trypop(profile->sql_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
|
while (switch_queue_trypop(profile->sql_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
|
||||||
char *sql = (char *) pop;
|
char *sql = (char *) pop;
|
||||||
@ -940,10 +941,13 @@ void *SWITCH_THREAD_FUNC sofia_profile_worker_thread_run(switch_thread_t *thread
|
|||||||
free(pop);
|
free(pop);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(sqlbuf + len, "commit;\n");
|
|
||||||
|
|
||||||
//printf("TRANS:\n%s\n", sqlbuf);
|
//printf("TRANS:\n%s\n", sqlbuf);
|
||||||
sofia_glue_actually_execute_sql(profile, sqlbuf, NULL);
|
sofia_glue_actually_execute_sql(profile, sqlbuf, NULL);
|
||||||
|
|
||||||
|
sprintf(sqlbuf, "commit;\n");
|
||||||
|
sofia_glue_actually_execute_sql(profile, sqlbuf, NULL);
|
||||||
|
|
||||||
|
|
||||||
switch_mutex_unlock(profile->ireg_mutex);
|
switch_mutex_unlock(profile->ireg_mutex);
|
||||||
loop_count = 0;
|
loop_count = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user