mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
Properly handle an error result from a manager action. This could have left the action list permanently locked for reading.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2091,11 +2091,9 @@ static int process_message(struct mansession *s, const struct message *m)
|
|||||||
for (tmp = first_action ; tmp; tmp = tmp->next) {
|
for (tmp = first_action ; tmp; tmp = tmp->next) {
|
||||||
if (strcasecmp(action, tmp->action))
|
if (strcasecmp(action, tmp->action))
|
||||||
continue;
|
continue;
|
||||||
if ((s->writeperm & tmp->authority) == tmp->authority) {
|
if ((s->writeperm & tmp->authority) == tmp->authority)
|
||||||
if (tmp->func(s, m)) { /* error */
|
ret = tmp->func(s, m);
|
||||||
return -1;
|
else
|
||||||
}
|
|
||||||
} else
|
|
||||||
astman_send_error(s, m, "Permission denied");
|
astman_send_error(s, m, "Permission denied");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user