]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mutex around one-off sql stmts from sofia
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 28 Jan 2013 22:41:29 +0000 (16:41 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 28 Jan 2013 22:41:29 +0000 (16:41 -0600)
src/mod/endpoints/mod_sofia/sofia_glue.c

index b47a0edbe2aaf3c19f9f681ffc7c8dbc6299d910..859214237d75cf83a2f7252422830352f9c374d2 100644 (file)
@@ -6389,7 +6389,9 @@ void sofia_glue_execute_sql_now(sofia_profile_t *profile, char **sqlp, switch_bo
        switch_assert(sqlp && *sqlp);
        sql = *sqlp;    
 
+       switch_mutex_lock(profile->ireg_mutex);
        switch_sql_queue_manager_push_confirm(profile->qm, sql, 0, !sql_already_dynamic);
+       switch_mutex_unlock(profile->ireg_mutex);
 
        if (sql_already_dynamic) {
                *sqlp = NULL;