[asterisk-commits] russell: branch russell/chan_refcount r104011 - /team/russell/chan_refcount/r...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 20 18:13:44 CST 2008


Author: russell
Date: Wed Feb 20 18:13:43 2008
New Revision: 104011

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104011
Log:
Fix some broken code.

Modified:
    team/russell/chan_refcount/res/snmp/agent.c

Modified: team/russell/chan_refcount/res/snmp/agent.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/res/snmp/agent.c?view=diff&rev=104011&r1=104010&r2=104011
==============================================================================
--- team/russell/chan_refcount/res/snmp/agent.c (original)
+++ team/russell/chan_refcount/res/snmp/agent.c Wed Feb 20 18:13:43 2008
@@ -223,7 +223,7 @@
 	static unsigned long long_ret;
 	static u_char bits_ret[2];
 	static char string_ret[256];
-	struct ast_channel *chan, *bridge;
+	struct ast_channel *chan = NULL, *bridge;
 	struct timeval tval;
 	u_char *ret = NULL;
 	int i, bit;
@@ -232,8 +232,10 @@
 	auto int var_channels_cb(void *obj, void *arg, int flags);
 	int var_channels_cb(void *obj, void *arg, int flags)
 	{
-		if (!--i)
+		if (!--i) {
+			chan = obj;
 			return CMP_STOP;
+		}
 		return 0;
 	}
 




More information about the asterisk-commits mailing list