]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 184079 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Tue, 24 Mar 2009 22:42:00 +0000 (22:42 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 24 Mar 2009 22:42:00 +0000 (22:42 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r184079 | mmichelson | 2009-03-24 17:40:39 -0500 (Tue, 24 Mar 2009) | 15 lines

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

  ........
    r184078 | mmichelson | 2009-03-24 17:34:45 -0500 (Tue, 24 Mar 2009) | 9 lines

    Change NULL pointer check to be ast_strlen_zero.

    The 'digit' variable is guaranteed to be non-NULL, so the if
    statement could never evaluate true. Changing to ast_strlen_zero
    makes the logic correct.

    This was found while reviewing ast_channel_ao2 code review.
  ........
................

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

apps/app_senddtmf.c

index 9863ce01213e38be79f919da9181f65cddd36ace..5a64ab1b0ed0249f48e12de98b18a8bc9a47701d 100644 (file)
@@ -92,7 +92,7 @@ static int manager_play_dtmf(struct mansession *s, const struct message *m)
                astman_send_error(s, m, "Channel not specified");
                return 0;
        }
-       if (!digit) {
+       if (ast_strlen_zero(digit)) {
                astman_send_error(s, m, "No digit specified");
                ast_channel_unlock(chan);
                return 0;