mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-25 20:19:36 +00:00
avoiding deadlock (by not locking then locking again)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8757 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f7c8ef4a3b
commit
f78f0592f5
@ -1561,8 +1561,6 @@ SWITCH_STANDARD_API(pa_cmd)
|
|||||||
"pa ringdev #<num>|<partial name>\n" "--------------------------------------------------------------------------------\n";
|
"pa ringdev #<num>|<partial name>\n" "--------------------------------------------------------------------------------\n";
|
||||||
|
|
||||||
|
|
||||||
switch_mutex_lock(globals.pa_mutex);
|
|
||||||
|
|
||||||
if (stream->param_event) {
|
if (stream->param_event) {
|
||||||
http = switch_event_get_header(stream->param_event, "http-host");
|
http = switch_event_get_header(stream->param_event, "http-host");
|
||||||
}
|
}
|
||||||
@ -1679,7 +1677,11 @@ SWITCH_STANDARD_API(pa_cmd)
|
|||||||
if (http) {
|
if (http) {
|
||||||
stream->write_function(stream, "<pre>");
|
stream->write_function(stream, "<pre>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_mutex_lock(globals.pa_mutex);
|
||||||
status = func(&argv[lead], argc - lead, stream);
|
status = func(&argv[lead], argc - lead, stream);
|
||||||
|
switch_mutex_unlock(globals.pa_mutex);
|
||||||
|
|
||||||
if (http) {
|
if (http) {
|
||||||
stream->write_function(stream, "\n\n</pre>");
|
stream->write_function(stream, "\n\n</pre>");
|
||||||
}
|
}
|
||||||
@ -1726,8 +1728,6 @@ SWITCH_STANDARD_API(pa_cmd)
|
|||||||
"<td><input name=action type=submit value=\"D\"></td></tr>\n" "</table>" "</form><br></center></td></tr></table>\n");
|
"<td><input name=action type=submit value=\"D\"></td></tr>\n" "</table>" "</form><br></center></td></tr></table>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_mutex_lock(globals.pa_mutex);
|
|
||||||
|
|
||||||
switch_safe_free(mycmd);
|
switch_safe_free(mycmd);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user