aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-16 00:10:17 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-16 00:10:17 +0000
commit01c1553ffd6e414a2bcf89e1622248552a4c3daa (patch)
tree60dadc38e049095a86801a2207bb93ed31ad6222 /main
parentfcf37dc1cef7f6e65d878083aa25dcc1c355bc91 (diff)
Properly handle an error result from a manager action. This could have left the action list permanently locked for reading.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/manager.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/main/manager.c b/main/manager.c
index bdb17f8f9..c1b09c2cb 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -2091,11 +2091,9 @@ static int process_message(struct mansession *s, const struct message *m)
for (tmp = first_action ; tmp; tmp = tmp->next) {
if (strcasecmp(action, tmp->action))
continue;
- if ((s->writeperm & tmp->authority) == tmp->authority) {
- if (tmp->func(s, m)) { /* error */
- return -1;
- }
- } else
+ if ((s->writeperm & tmp->authority) == tmp->authority)
+ ret = tmp->func(s, m);
+ else
astman_send_error(s, m, "Permission denied");
break;
}