diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-03 14:42:58 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-03 14:42:58 +0000 |
commit | 44d4e9a33833ed6d4441f4ced64d3e295b6067b2 (patch) | |
tree | 71346dc7b3853b0c604c6a77654dad7f9f9b477b | |
parent | d740979a310648e0825a9ea2a4489d10572ae001 (diff) |
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 #12361)
Reported by: one47
Patches:
chan_zap_deferred_digit.patch uploaded by one47 (license 23)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@112601 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_zap.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index ae5f34e80..697f3fe3b 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -4990,15 +4990,15 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast) case SIG_SF_FEATDMF: case SIG_SF_FEATB: /* FGD MF *Must* wait for wink */ - if (!ast_strlen_zero(p->dop.dialstr)) + if (!ast_strlen_zero(p->dop.dialstr)) { res = ioctl(p->subs[SUB_REAL].zfd, ZT_DIAL, &p->dop); - else if (res < 0) { - ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d\n", p->channel); - p->dop.dialstr[0] = '\0'; - return NULL; - } else - ast_debug(1, "Sent deferred digit string: %s\n", p->dop.dialstr); - + if (res < 0) { + ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d\n", p->channel); + p->dop.dialstr[0] = '\0'; + return NULL; + } else + ast_debug(1, "Sent deferred digit string: %s\n", p->dop.dialstr); + } p->dop.dialstr[0] = '\0'; break; default: @@ -5019,15 +5019,15 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast) case SIG_SF: case SIG_SFWINK: case SIG_SF_FEATD: - if (!ast_strlen_zero(p->dop.dialstr)) + if (!ast_strlen_zero(p->dop.dialstr)) { res = ioctl(p->subs[SUB_REAL].zfd, ZT_DIAL, &p->dop); - else if (res < 0) { - ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d\n", p->channel); - p->dop.dialstr[0] = '\0'; - return NULL; - } else - ast_debug(1, "Sent deferred digit string: %s\n", p->dop.dialstr); - + if (res < 0) { + ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d\n", p->channel); + p->dop.dialstr[0] = '\0'; + return NULL; + } else + ast_debug(1, "Sent deferred digit string: %s\n", p->dop.dialstr); + } p->dop.dialstr[0] = '\0'; p->dop.op = ZT_DIAL_OP_REPLACE; break; |