[asterisk-commits] file: trunk r54711 - /trunk/main/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 15 17:10:18 MST 2007


Author: file
Date: Thu Feb 15 18:10:17 2007
New Revision: 54711

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54711
Log:
Properly handle an error result from a manager action. This could have left the action list permanently locked for reading.

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=54711&r1=54710&r2=54711
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Thu Feb 15 18:10:17 2007
@@ -2091,11 +2091,9 @@
 	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;
 	}



More information about the asterisk-commits mailing list