[Home]

Summary:ASTERISK-11776: chan_zap deferred dialling, bad-condition causes no WARN/DEBUG output
Reporter:Steve Davies (one47)Labels:
Date Opened:2008-04-03 05:36:32Date Closed:2008-04-03 09:38:19
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_zap
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_zap_deferred_digit.patch
Description:When the ZT_EVENT_HOOKCOMPLETE event occurs in chan_zap, many technologies will arrange for any un-sent digits to be dialled.

There is a logic error in the if statements which cause the dial and print status messages. Status messages will never be displayed, and a test is potentially done on an uninitialised variable "res"


****** ADDITIONAL INFORMATION ******

It is highly unlikely that this will ever produce a message in error, but it is better to be correct :)

I am attaching a patch against 1.4.19 which I believe corrects this. This "fix" is copied from the example at chan_zap.c line 4404, which I believe is correct.
Comments:By: Mark Michelson (mmichelson) 2008-04-03 09:23:02

Thanks for the patch! I will commit ASAP.

By: Digium Subversion (svnbot) 2008-04-03 09:27:35

Repository: asterisk
Revision: 112599

U   branches/1.4/channels/chan_zap.c

------------------------------------------------------------------------
r112599 | mmichelson | 2008-04-03 09:27:33 -0500 (Thu, 03 Apr 2008) | 9 lines

Fix the testing of the "res" variable so that it is more logically correct and
makes the correct warning and debug messages print.

(closes issue ASTERISK-11776)
Reported by: one47
Patches:
     chan_zap_deferred_digit.patch uploaded by one47 (license 23)


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=112599

By: Digium Subversion (svnbot) 2008-04-03 09:31:01

Repository: asterisk
Revision: 112600

_U  trunk/
U   trunk/channels/chan_zap.c

------------------------------------------------------------------------
r112600 | mmichelson | 2008-04-03 09:31:00 -0500 (Thu, 03 Apr 2008) | 17 lines

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

........
r112599 | mmichelson | 2008-04-03 09:32:20 -0500 (Thu, 03 Apr 2008) | 9 lines

Fix the testing of the "res" variable so that it is more logically correct and
makes the correct warning and debug messages print.

(closes issue ASTERISK-11776)
Reported by: one47
Patches:
     chan_zap_deferred_digit.patch uploaded by one47 (license 23)


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=112600

By: Digium Subversion (svnbot) 2008-04-03 09:38:19

Repository: asterisk
Revision: 112601

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_zap.c

------------------------------------------------------------------------
r112601 | mmichelson | 2008-04-03 09:38:18 -0500 (Thu, 03 Apr 2008) | 25 lines

Merged revisions 112600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r112600 | mmichelson | 2008-04-03 09:35:47 -0500 (Thu, 03 Apr 2008) | 17 lines

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

........
r112599 | mmichelson | 2008-04-03 09:32:20 -0500 (Thu, 03 Apr 2008) | 9 lines

Fix the testing of the "res" variable so that it is more logically correct and
makes the correct warning and debug messages print.

(closes issue ASTERISK-11776)
Reported by: one47
Patches:
     chan_zap_deferred_digit.patch uploaded by one47 (license 23)


........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=112601