diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-06 19:09:30 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-06 19:09:30 +0000 |
commit | e30e4a941b8d59dccc6f329dc3efe710d0f1019b (patch) | |
tree | f4dbfa68f96527b34e723d080f6b5be732e2ff4e /codecs | |
parent | cbaaaa413f4eb1317f7cd4ae1264af98b348aa62 (diff) |
Correctly set the total number of channels from a zaptel transcoder board.
SPD-49, patch by Matthew Nicholson.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89046 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs')
-rw-r--r-- | codecs/codec_zap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c index 717b260e9..79ac8b313 100644 --- a/codecs/codec_zap.c +++ b/codecs/codec_zap.c @@ -224,7 +224,6 @@ static void zap_destroy(struct ast_trans_pvt *pvt) if (ioctl(ztp->fd, ZT_TRANSCODE_OP, &x)) ast_log(LOG_WARNING, "Failed to release transcoder channel: %s\n", strerror(errno)); - ast_atomic_fetchadd_int(&channels.total, -1); switch (ztp->hdr->dstfmt) { case AST_FORMAT_G729A: case AST_FORMAT_G723_1: @@ -286,7 +285,6 @@ static int zap_translate(struct ast_trans_pvt *pvt, int dest, int source) ztp->fd = fd; ztp->hdr = hdr; - ast_atomic_fetchadd_int(&channels.total, +1); switch (hdr->dstfmt) { case AST_FORMAT_G729A: case AST_FORMAT_G723_1: @@ -442,6 +440,7 @@ static int find_transcoders(void) if (option_verbose > 1) ast_verbose(VERBOSE_PREFIX_2 "Found transcoder '%s'.\n", info.name); build_translators(&map, info.dstfmts, info.srcfmts); + ast_atomic_fetchadd_int(&channels.total, info.numchannels / 2); } close(fd); |