mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Have the manager interface send back an "Already logged in" message instead of "Invalid/Unknown Command" when the client authenticates for a second time. (issue #8509 reported by pari)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@52373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2020,6 +2020,11 @@ static int process_message(struct mansession *s, const struct message *m)
|
||||
return -1;
|
||||
} else
|
||||
astman_send_error(s, m, "Authentication Required");
|
||||
} else {
|
||||
if (!strcasecmp(action, "Login")) {
|
||||
ast_mutex_lock(&s->__lock);
|
||||
astman_send_ack(s, m, "Already logged in");
|
||||
ast_mutex_unlock(&s->__lock);
|
||||
} else {
|
||||
ast_mutex_lock(&actionlock);
|
||||
for (tmp = first_action; tmp; tmp = tmp->next) {
|
||||
@@ -2034,10 +2039,12 @@ static int process_message(struct mansession *s, const struct message *m)
|
||||
ast_mutex_unlock(&s->__lock);
|
||||
break;
|
||||
}
|
||||
|
||||
ast_mutex_unlock(&actionlock);
|
||||
if (!tmp)
|
||||
astman_send_error(s, m, "Invalid/unknown command");
|
||||
}
|
||||
}
|
||||
if (ret)
|
||||
return ret;
|
||||
return process_events(s);
|
||||
|
Reference in New Issue
Block a user