[asterisk-commits] tilghman: branch 1.6.0 r121872 - in /branches/1.6.0: ./ channels/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 11 13:20:19 CDT 2008


Author: tilghman
Date: Wed Jun 11 13:20:18 2008
New Revision: 121872

URL: http://svn.digium.com/view/asterisk?view=rev&rev=121872
Log:
Merged revisions 121867 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r121867 | tilghman | 2008-06-11 13:19:24 -0500 (Wed, 11 Jun 2008) | 11 lines

Merged revisions 121861 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121861 | tilghman | 2008-06-11 13:18:16 -0500 (Wed, 11 Jun 2008) | 3 lines

Make calls to ast_assert() actually test something, so that the error message
printed is not nonsensical (reported by mvanbaak via #asterisk-bugs).

........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_agent.c
    branches/1.6.0/main/abstract_jb.c
    branches/1.6.0/main/channel.c
    branches/1.6.0/main/sched.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_agent.c?view=diff&rev=121872&r1=121871&r2=121872
==============================================================================
--- branches/1.6.0/channels/chan_agent.c (original)
+++ branches/1.6.0/channels/chan_agent.c Wed Jun 11 13:20:18 2008
@@ -1018,7 +1018,7 @@
 	if (p->chan) {
 		if (ast_test_flag(p->chan, AST_FLAG_BLOCKING)) {
 			ast_log( LOG_ERROR, "A blocker exists after agent channel ownership acquired\n" );
-			ast_assert(0);
+			ast_assert(ast_test_flag(p->chan, AST_FLAG_BLOCKING) == 0);
 		}
 	}
 	return tmp;

Modified: branches/1.6.0/main/abstract_jb.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/abstract_jb.c?view=diff&rev=121872&r1=121871&r2=121872
==============================================================================
--- branches/1.6.0/main/abstract_jb.c (original)
+++ branches/1.6.0/main/abstract_jb.c Wed Jun 11 13:20:18 2008
@@ -430,7 +430,7 @@
 			return;
 		default:
 			ast_log(LOG_ERROR, "This should never happen!\n");
-			ast_assert(0);
+			ast_assert("JB type unknown" == NULL);
 			break;
 		}
 		
@@ -484,10 +484,9 @@
 			*tmp = '#';
 		
 		bridged = ast_bridged_channel(chan);
-		if (!bridged) {
-			/* We should always have bridged chan if a jitterbuffer is in use */
-			ast_assert(0);
-		}
+		/* We should always have bridged chan if a jitterbuffer is in use */
+		ast_assert(bridged != NULL);
+
 		snprintf(name1, sizeof(name1), "%s", bridged->name);
 		tmp = strchr(name1, '/');
 		if (tmp)

Modified: branches/1.6.0/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/channel.c?view=diff&rev=121872&r1=121871&r2=121872
==============================================================================
--- branches/1.6.0/main/channel.c (original)
+++ branches/1.6.0/main/channel.c Wed Jun 11 13:20:18 2008
@@ -975,7 +975,7 @@
 	if (((fin->frametype == AST_FRAME_VOICE) && (qlen > 96)) || (qlen  > 128)) {
 		if (fin->frametype != AST_FRAME_VOICE) {
 			ast_log(LOG_WARNING, "Exceptionally long queue length queuing to %s\n", chan->name);
-			ast_assert(0);
+			ast_assert(fin->frametype == AST_FRAME_VOICE);
 		} else {
 			ast_debug(1, "Dropping voice to exceptionally long queue on %s\n", chan->name);
 			ast_frfree(f);
@@ -1611,7 +1611,7 @@
 		ast_log(LOG_WARNING, "Hard hangup called by thread %ld on %s, while fd "
 					"is blocked by thread %ld in procedure %s!  Expect a failure\n",
 					(long)pthread_self(), chan->name, (long)chan->blocker, chan->blockproc);
-		ast_assert(0);
+		ast_assert(ast_test_flag(chan, AST_FLAG_BLOCKING) == 0);
 	}
 	if (!ast_test_flag(chan, AST_FLAG_ZOMBIE)) {
 		ast_debug(1, "Hanging up channel '%s'\n", chan->name);

Modified: branches/1.6.0/main/sched.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/sched.c?view=diff&rev=121872&r1=121871&r2=121872
==============================================================================
--- branches/1.6.0/main/sched.c (original)
+++ branches/1.6.0/main/sched.c Wed Jun 11 13:20:18 2008
@@ -289,7 +289,7 @@
 
 	if (!s) {
 		ast_debug(1, "Attempted to delete nonexistent schedule entry %d!\n", id);
-		ast_assert(0);
+		ast_assert(s != NULL);
 		return -1;
 	}
 	




More information about the asterisk-commits mailing list