From c334ae77450c565135a055dd8812e99977158f5a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 4 Feb 2009 21:34:02 +0000 Subject: [PATCH] allow commented categories git-svn-id: http://svn.openzap.org/svn/openzap/trunk@644 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c | 6 +++--- libs/openzap/src/zap_io.c | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c b/libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c index 15cd842027..2677085aa8 100644 --- a/libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c +++ b/libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c @@ -654,9 +654,9 @@ static void *zap_analog_channel_run(zap_thread_t *me, void *obj) } if ((zchan->dtmf_buffer && zap_buffer_inuse(zchan->dtmf_buffer)) || (zchan->fsk_buffer && zap_buffer_inuse(zchan->fsk_buffer))) { - rlen = len; - memset(frame, 0, len); - zap_channel_write(zchan, frame, sizeof(frame), &rlen); + //rlen = len; + //memset(frame, 0, len); + //zap_channel_write(zchan, frame, sizeof(frame), &rlen); continue; } diff --git a/libs/openzap/src/zap_io.c b/libs/openzap/src/zap_io.c index 714160ca8e..9dbfa9efd9 100644 --- a/libs/openzap/src/zap_io.c +++ b/libs/openzap/src/zap_io.c @@ -2098,7 +2098,12 @@ static zap_status_t load_config(void) } while (zap_config_next_pair(&cfg, &var, &val)) { - if (!strncasecmp(cfg.category, "span", 4)) { + if (*cfg.category == '#') { + if (cfg.catno != catno) { + zap_log(ZAP_LOG_DEBUG, "Skipping %s\n", cfg.category); + catno = cfg.catno; + } + } else if (!strncasecmp(cfg.category, "span", 4)) { if (cfg.catno != catno) { char *type = cfg.category + 4; char *name;