[svn-commits] qwell: trunk r89047 - in /trunk: ./ codecs/codec_zap.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 6 13:10:18 CST 2007


Author: qwell
Date: Tue Nov  6 13:10:18 2007
New Revision: 89047

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89047
Log:
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.

........

Modified:
    trunk/   (props changed)
    trunk/codecs/codec_zap.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_zap.c?view=diff&rev=89047&r1=89046&r2=89047
==============================================================================
--- trunk/codecs/codec_zap.c (original)
+++ trunk/codecs/codec_zap.c Tue Nov  6 13:10:18 2007
@@ -219,7 +219,6 @@
 	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 @@
 	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 @@
 	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);
 




More information about the svn-commits mailing list