]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 238916 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Sat, 9 Jan 2010 01:27:35 +0000 (01:27 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sat, 9 Jan 2010 01:27:35 +0000 (01:27 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r238916 | tilghman | 2010-01-08 19:08:04 -0600 (Fri, 08 Jan 2010) | 13 lines

  Merged revisions 238915 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r238915 | tilghman | 2010-01-08 18:57:58 -0600 (Fri, 08 Jan 2010) | 6 lines

    -1 is interpreted as an error, intead of the maximum mask.
    (closes issue #16241)
     Reported by: vnovy
     Patches:
           manager.c.patch uploaded by vnovy (license 922)
  ........
................

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

main/manager.c

index 7cbfcbc52a8821de2a960ea0cccda759fe895f60..dfd8b7b4e10d55269895646d10f0230930880932 100644 (file)
@@ -373,7 +373,7 @@ static struct permalias {
        { EVENT_FLAG_CDR, "cdr" },
        { EVENT_FLAG_DIALPLAN, "dialplan" },
        { EVENT_FLAG_ORIGINATE, "originate" },
-       { -1, "all" },
+       { INT_MAX, "all" },
        { 0, "none" },
 };
 
@@ -448,7 +448,7 @@ static int strings_to_mask(const char *string)
        for (p = string; *p; p++)
                if (*p < '0' || *p > '9')
                        break;
-       if (!p) /* all digits */
+       if (!*p) /* all digits */
                return atoi(string);
        if (ast_false(string))
                return 0;