[svn-commits] mmichelson: trunk r89331 - /trunk/main/manager.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Nov 16 13:41:15 CST 2007
Author: mmichelson
Date: Fri Nov 16 13:41:15 2007
New Revision: 89331
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89331
Log:
Added some locks that should have been around astman_send_error,
at least according to the comments.
(closes issue #11258, reported and patched by eliel)
Modified:
trunk/main/manager.c
Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=89331&r1=89330&r2=89331
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Nov 16 13:41:15 2007
@@ -2384,7 +2384,9 @@
ast_debug(1, "Manager received command '%s'\n", action);
if (ast_strlen_zero(action)) {
+ ast_mutex_lock(&s->__lock);
astman_send_error(s, m, "Missing action in request");
+ ast_mutex_unlock(&s->__lock);
return 0;
}
@@ -2399,7 +2401,9 @@
(!strcasecmp(action, "Login") || !strcasecmp(action, "Challenge"))) {
if (check_manager_session_inuse(user)) {
sleep(1);
+ ast_mutex_lock(&s->__lock);
astman_send_error(s, m, "Login Already In Use");
+ ast_mutex_lock(&s->__lock);
return -1;
}
}
More information about the svn-commits
mailing list