[asterisk-commits] russell: trunk r69067 - /trunk/res/snmp/agent.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jun 13 09:05:22 MST 2007


Author: russell
Date: Wed Jun 13 11:05:22 2007
New Revision: 69067

URL: http://svn.digium.com/view/asterisk?view=rev&rev=69067
Log:
The variable used for the return value must be declared as static.  I broke
this when applying the patch, sorry!
(issue #9637, jeffg)

Modified:
    trunk/res/snmp/agent.c

Modified: trunk/res/snmp/agent.c
URL: http://svn.digium.com/view/asterisk/trunk/res/snmp/agent.c?view=diff&rev=69067&r1=69066&r2=69067
==============================================================================
--- trunk/res/snmp/agent.c (original)
+++ trunk/res/snmp/agent.c Wed Jun 13 11:05:22 2007
@@ -590,14 +590,14 @@
 static u_char *ast_var_channel_bridge(struct variable *vp, oid *name, size_t *length,
 	int exact, size_t *var_len, WriteMethod **write_method)
 {
-	unsigned long long_ret = 0;
+	static unsigned long long_ret = 0;
 	struct ast_channel *chan = NULL;
 
 	if (header_generic(vp, name, length, exact, var_len, write_method))
 		return NULL;
 
 	while ((chan = ast_channel_walk_locked(chan))) {
-		if (ast_bridged_channel(chan) != NULL)
+		if (ast_bridged_channel(chan))
 			long_ret++;
 		ast_channel_unlock(chan);
 	}



More information about the asterisk-commits mailing list