diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-06 19:10:18 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-06 19:10:18 +0000 |
commit | 6314703e326f1f20c709a890a958f07b9ee6a69c (patch) | |
tree | b9d2c145d0626dd2b407a10bbc1829e6c671b365 /codecs | |
parent | 92ac6820ee5bc6595e8e0b6f7e14fd6983146acc (diff) |
Merged revisions 89046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89046 | qwell | 2007-11-06 13:09:30 -0600 (Tue, 06 Nov 2007) | 4 lines
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/trunk@89047 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 5802ff2a1..c38aa5a6b 100644 --- a/codecs/codec_zap.c +++ b/codecs/codec_zap.c @@ -219,7 +219,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: @@ -281,7 +280,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: @@ -438,6 +436,7 @@ static int find_transcoders(void) for (info.tcnum = 0; !(res = ioctl(fd, ZT_TRANSCODE_OP, &info)); info.tcnum++) { ast_verb(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); |