]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3768 Mutex lock missing. I would personally removed that lock since all the sql...
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Sat, 17 Dec 2011 18:06:37 +0000 (13:06 -0500)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Sat, 17 Dec 2011 18:06:37 +0000 (13:06 -0500)
src/mod/endpoints/mod_sofia/sofia_reg.c

index deaa379a598182ece9c7fd03776266ec857c698f..ea7ca0a6cfc20af258979a64049a8b7e12b973d2 100644 (file)
@@ -1520,6 +1520,8 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                        char buf[32] = "";
                        sql = switch_mprintf("select count(*) from sip_registrations where sip_user='%q' and sip_host='%q' and contact='%q'", to_user, reg_host, contact_str);
 
+                       switch_mutex_lock(profile->ireg_mutex);
+
                        sofia_glue_execute_sql2str(profile, profile->ireg_mutex, sql, buf, sizeof(buf));
                        switch_safe_free(sql);
                        if (atoi(buf) > 0) {