Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv6547/apps

Modified Files:
        app_chanisavail.c 
Log Message:
make sure to LOCAL_USER_REMOVE in all cases where the application can exit 
(issue #5307)


Index: app_chanisavail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_chanisavail.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- app_chanisavail.c   25 Sep 2005 20:37:05 -0000      1.20
+++ app_chanisavail.c   28 Sep 2005 19:42:36 -0000      1.21
@@ -101,6 +101,7 @@
                        number = strchr(tech, '/');
                        if (!number) {
                                ast_log(LOG_WARNING, "ChanIsAvail argument 
takes format ([technology]/[device])\n");
+                               LOCAL_USER_REMOVE(u);
                                return -1;
                        }
                        *number = '\0';
@@ -135,8 +136,10 @@
        if (res < 1) {
                pbx_builtin_setvar_helper(chan, "AVAILCHAN", "");
                pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
-               if (ast_goto_if_exists(chan, chan->context, chan->exten, 
chan->priority + 101))
+               if (ast_goto_if_exists(chan, chan->context, chan->exten, 
chan->priority + 101)) {
+                       LOCAL_USER_REMOVE(u);
                        return -1;
+               }
        }
 
        LOCAL_USER_REMOVE(u);

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to