[asterisk-commits] russell: branch russell/issue_9520 r114448 - /team/russell/issue_9520/include...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 21 17:14:03 CDT 2008


Author: russell
Date: Mon Apr 21 17:14:03 2008
New Revision: 114448

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114448
Log:
fix up return value of the SCHED_DEL macro

Modified:
    team/russell/issue_9520/include/asterisk/sched.h

Modified: team/russell/issue_9520/include/asterisk/sched.h
URL: http://svn.digium.com/view/asterisk/team/russell/issue_9520/include/asterisk/sched.h?view=diff&rev=114448&r1=114447&r2=114448
==============================================================================
--- team/russell/issue_9520/include/asterisk/sched.h (original)
+++ team/russell/issue_9520/include/asterisk/sched.h Mon Apr 21 17:14:03 2008
@@ -56,12 +56,11 @@
 #define AST_SCHED_DEL(sched, id) \
 	({ \
 		int _count = 0; \
-		int _sched_res = 0; \
-		while (id > -1 && ast_sched_del(sched, id) && ++_count < 10) \
+		int _sched_res = -1; \
+		while (id > -1 && (_sched_res = ast_sched_del(sched, id)) && ++_count < 10) \
 			usleep(1); \
 		if (_count == 10 && option_debug > 2) { \
 			ast_log(LOG_DEBUG, "Unable to cancel schedule ID %d.\n", id); \
-			_sched_res = -1; \
 		} \
 		id = -1; \
 		(_sched_res); \




More information about the asterisk-commits mailing list