[asterisk-bugs] [Asterisk 0010118]: Bad operator (OBJECT-IDENTIFIER): At line 739 in /usr/local/share/snmp/mibs/ASTERISK-MIB
noreply at bugs.digium.com
noreply at bugs.digium.com
Wed Aug 22 12:29:58 CDT 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=10118
======================================================================
Reported By: Matti
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 10118
Category: Resources/res_snmp
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 71520
Disclaimer on File?: Yes
Request Review:
======================================================================
Date Submitted: 07-05-2007 04:09 CDT
Last Modified: 08-22-2007 12:29 CDT
======================================================================
Summary: Bad operator (OBJECT-IDENTIFIER): At line 739 in
/usr/local/share/snmp/mibs/ASTERISK-MIB
Description:
Net-SNMP 5.4 reports an error in ASTERISK-MIB.
Linux lk10 2.6.22-rc7 http://bugs.digium.com/view.php?id=2 SMP PREEMPT Mon Jul 2
11:28:05 EEST 2007 i686
unknown unknown GNU/Linux
======================================================================
----------------------------------------------------------------------
jeffg - 08-22-07 12:29
----------------------------------------------------------------------
Attached file 10118-fix.patch, which fixes the typo in the MIB definition
that caused the "Bad operator" message, and also fixes the SNMP agent code
to correct the behavior of astNumChanBridged to be a Counter again. My new
Mantis-based disclaimer is still pending, but I have a paper one on file,
so pasting the short patch here as well.
Index: doc/asterisk-mib.txt
===================================================================
--- doc/asterisk-mib.txt (revision 80290)
+++ doc/asterisk-mib.txt (working copy)
@@ -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
Index: res/snmp/agent.c
===================================================================
--- res/snmp/agent.c (revision 80290)
+++ res/snmp/agent.c (working copy)
@@ -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),
Issue History
Date Modified Username Field Change
======================================================================
08-22-07 12:29 jeffg Note Added: 0069260
======================================================================
More information about the asterisk-bugs
mailing list