[asterisk-commits] russell: trunk r80510 - in /trunk: doc/asterisk-mib.txt res/snmp/agent.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 23 12:27:07 CDT 2007
Author: russell
Date: Thu Aug 23 12:27:07 2007
New Revision: 80510
URL: http://svn.digium.com/view/asterisk?view=rev&rev=80510
Log:
Fix a typo in the Asterisk MIB and fix astNumChanBridged so it acts as a counter again
(closes issue #10118, patch by jeffg)
Modified:
trunk/doc/asterisk-mib.txt
trunk/res/snmp/agent.c
Modified: trunk/doc/asterisk-mib.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/asterisk-mib.txt?view=diff&rev=80510&r1=80509&r2=80510
==============================================================================
--- trunk/doc/asterisk-mib.txt (original)
+++ trunk/doc/asterisk-mib.txt Thu Aug 23 12:27:07 2007
@@ -736,7 +736,7 @@
"Number of active channels using the current technology."
::= { astChanTypeEntry 7 }
-astChanScalars OBJECT-IDENTIFIER ::= { asteriskChannels 5 }
+astChanScalars OBJECT IDENTIFIER ::= { asteriskChannels 5 }
astNumChanBridge OBJECT-TYPE
SYNTAX Gauge32
@@ -744,6 +744,6 @@
STATUS current
DESCRIPTION
"Number of channels currently in a bridged state."
- ::= { asteriskChanScalars 1 }
+ ::= { astChanScalars 1 }
END
Modified: trunk/res/snmp/agent.c
URL: http://svn.digium.com/view/asterisk/trunk/res/snmp/agent.c?view=diff&rev=80510&r1=80509&r2=80510
==============================================================================
--- trunk/res/snmp/agent.c (original)
+++ trunk/res/snmp/agent.c Thu Aug 23 12:27:07 2007
@@ -138,7 +138,8 @@
#define ASTCHANTYPETRANSFER 6
#define ASTCHANTYPECHANNELS 7
-#define ASTCHANBRIDGECOUNT 5
+#define ASTCHANSCALARS 5
+#define ASTCHANBRIDGECOUNT 1
void *agent_thread(void *arg)
{
@@ -546,9 +547,10 @@
static u_char *ast_var_channel_bridge(struct variable *vp, oid *name, size_t *length,
int exact, size_t *var_len, WriteMethod **write_method)
{
- static unsigned long long_ret = 0;
+ static unsigned long long_ret;
struct ast_channel *chan = NULL;
+ long_ret = 0;
if (header_generic(vp, name, length, exact, var_len, write_method))
return NULL;
@@ -778,7 +780,7 @@
{ASTCHANTYPEINDICATIONS, ASN_INTEGER, RONLY, ast_var_channel_types_table, 4, {ASTCHANNELS, ASTCHANTYPETABLE, 1, ASTCHANTYPEINDICATIONS}},
{ASTCHANTYPETRANSFER, ASN_INTEGER, RONLY, ast_var_channel_types_table, 4, {ASTCHANNELS, ASTCHANTYPETABLE, 1, ASTCHANTYPETRANSFER}},
{ASTCHANTYPECHANNELS, ASN_GAUGE, RONLY, ast_var_channel_types_table, 4, {ASTCHANNELS, ASTCHANTYPETABLE, 1, ASTCHANTYPECHANNELS}},
- {ASTCHANBRIDGECOUNT, ASN_GAUGE, RONLY, ast_var_channel_bridge, 2, {ASTCHANNELS, ASTCHANBRIDGECOUNT}},
+ {ASTCHANBRIDGECOUNT, ASN_GAUGE, RONLY, ast_var_channel_bridge, 3, {ASTCHANNELS, ASTCHANSCALARS, ASTCHANBRIDGECOUNT}},
};
register_sysORTable(asterisk_oid, OID_LENGTH(asterisk_oid),
More information about the asterisk-commits
mailing list