From 75b1f063ce7e560ab7b581f1c3443b2a770bfd5a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 4 Oct 2008 19:00:13 +0000 Subject: [PATCH] update git-svn-id: http://svn.openzap.org/svn/openzap/trunk@582 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/include/openzap.h | 1 + libs/openzap/src/zap_io.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/openzap/src/include/openzap.h b/libs/openzap/src/include/openzap.h index 7e670f14c2..567a0e53eb 100644 --- a/libs/openzap/src/include/openzap.h +++ b/libs/openzap/src/include/openzap.h @@ -166,6 +166,7 @@ #define zap_copy_string(x,y,z) strncpy(x, y, z - 1) #define zap_set_string(x,y) strncpy(x, y, sizeof(x)-1) #define zap_strlen_zero(s) (!s || *s == '\0') +#define zap_strlen_zero_buf(s) (*s == '\0') #define zap_channel_test_feature(obj, flag) ((obj)->features & flag) diff --git a/libs/openzap/src/zap_io.c b/libs/openzap/src/zap_io.c index 1f07f3af98..8d74f9faf6 100644 --- a/libs/openzap/src/zap_io.c +++ b/libs/openzap/src/zap_io.c @@ -1698,7 +1698,7 @@ static zap_status_t handle_dtmf(zap_channel_t *zchan, zap_size_t datalen) dblen = sizeof(digits) - 1; } - if (zap_buffer_read(zchan->gen_dtmf_buffer, digits, dblen) && !zap_strlen_zero(digits)) { + if (zap_buffer_read(zchan->gen_dtmf_buffer, digits, dblen) && !zap_strlen_zero_buf(digits)) { zap_log(ZAP_LOG_DEBUG, "%d:%d GENERATE DTMF [%s]\n", zchan->span_id, zchan->chan_id, digits); for (cur = digits; *cur; cur++) {