mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2384,7 +2384,9 @@ static int process_message(struct mansession *s, const struct message *m)
|
||||
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 @@ static int process_message(struct mansession *s, const struct message *m)
|
||||
(!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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user