[asterisk-commits] russell: branch russell/sip_refcount r140410 - /team/russell/sip_refcount/inc...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 28 20:39:59 CDT 2008


Author: russell
Date: Thu Aug 28 20:39:59 2008
New Revision: 140410

URL: http://svn.digium.com/view/asterisk?view=rev&rev=140410
Log:
Fix a bug in AST_SCHED_REPLACE_UNREF_VARIABLE.  The problem here is that you
_must_ increment the reference count on the object before putting the entry
in the scheduler.

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

Modified: team/russell/sip_refcount/include/asterisk/sched.h
URL: http://svn.digium.com/view/asterisk/team/russell/sip_refcount/include/asterisk/sched.h?view=diff&rev=140410&r1=140409&r2=140410
==============================================================================
--- team/russell/sip_refcount/include/asterisk/sched.h (original)
+++ team/russell/sip_refcount/include/asterisk/sched.h Thu Aug 28 20:39:59 2008
@@ -97,11 +97,9 @@
 			unrefcall;	/* should ref _data! */		\
 		if (_count == 10) \
 			ast_log(LOG_WARNING, "Unable to cancel schedule ID %d.  This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \
-		id = ast_sched_add_variable(sched, when, callback, data, variable); \
+		id = ast_sched_add_variable(sched, when, callback, refcall, variable); \
 		if (id == -1)  \
 			addfailcall;	\
-		else \
-			refcall; \
 	} while (0);
 
 #define AST_SCHED_REPLACE_UNREF(id, sched, when, callback, data, unrefcall, addfailcall, refcall) \




More information about the asterisk-commits mailing list