Summary:ASTERISK-05604: [patch] app_playback option parsing's inverted
Reporter:pjc (pjc)Labels:
Date Opened:2005-11-14 21:15:28.000-0600Date Closed:2008-01-15 15:56:08.000-0600
Versions:Frequency of
Environment:Attachments:( 0) app_playback_option.patch
Description:The option parsing in app_playback inverts the sense of the tests:

 if (!strcasestr(args.options, "skip"))
 if (!strcasestr(args.options, "noanswer"))

This would work for strcmp (zero is equal), however, strcasestr appears to return a pointer into the substring if a match is found (null is not equal).  Symptoms I've noticed include messages being played when they should be skipped, and peculiar behavior of indications on my SIP phones (because the channel's presumably been answered).  I've enclosed a trivial patch which should fix the issue.
Comments:By: BJ Weschke (bweschke) 2005-11-14 21:57:42.000-0600

good catch!

By: Kevin P. Fleming (kpfleming) 2005-11-15 14:43:36.000-0600

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:56:08.000-0600

Repository: asterisk
Revision: 7102

U   trunk/ChangeLog
U   trunk/apps/app_playback.c

r7102 | kpfleming | 2008-01-15 15:56:08 -0600 (Tue, 15 Jan 2008) | 2 lines

issue ASTERISK-5604