提交 d2b4d8ef authored 作者: Marc Olivier Chouinard's avatar Marc Olivier Chouinard

FS-3768 Mutex lock missing. I would personally removed that lock since all the…

FS-3768 Mutex lock missing.  I would personally removed that lock since all the sql call does lock it now.  But maybe it required that no other request be done in the mean time.
上级 ec2dce58
......@@ -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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论