]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_agi.c:handle_getvariablefull() could recursively lock a channel and not
authorBrett Bryant <bbryant@digium.com>
Thu, 30 Sep 2010 17:08:20 +0000 (17:08 +0000)
committerBrett Bryant <bbryant@digium.com>
Thu, 30 Sep 2010 17:08:20 +0000 (17:08 +0000)
release it if an argument is the current channel's name.

(closes issue #17970)
Reported by: mdu113
Patches:
      res_agi.c.diff3 uploaded by mdu113 (license 582)
      Tested by: mdu113

      Review: https://reviewboard.asterisk.org/r/947/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@289500 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_agi.c

index 27d363429d6dd452cdd20e2d33cc2670b7dca372..75f2a1bdfd3da84accad3234b0b7598d8ecdca6e 100644 (file)
@@ -1240,7 +1240,7 @@ static int handle_getvariablefull(struct ast_channel *chan, AGI *agi, int argc,
 
        if ((argc != 4) && (argc != 5))
                return RESULT_SHOWUSAGE;
-       if (argc == 5) {
+       if (argc == 5 && strcasecmp(chan->name, argv[4])) {
                chan2 = ast_get_channel_by_name_locked(argv[4]);
        } else {
                chan2 = chan;