From: Ilia Alshanetsky Date: Mon, 1 Jun 2009 13:10:57 +0000 (+0000) Subject: Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values). X-Git-Tag: php-5.2.10RC2~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e7fa70fd532d9605796ecd2db3eaa0bd97fb9ce;p=php Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values). --- diff --git a/NEWS b/NEWS index 92c2e04e7d..0c1975b099 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ PHP NEWS files). (Pierre) - Fixed bug #48359 (Script hangs on snmprealwalk if OID is not increasing). (Ilia, simonov at gmail dot com) +- Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values). + (Ilia, lytboris at gmail dot com) - Fixed bug #48247 (Crash on errors during startup). (Stas) - Fixed bug #42143 (The constant NAN is reported as 0 on Windows) (Kanwaljeet Singla, Venkat Raman Don) diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 0850f86cec..0689e5270f 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -479,7 +479,7 @@ retry: return; } else if (st == SNMP_CMD_WALK) { add_next_index_zval(return_value,snmpval); /* Add to returned array */ - } else if (st == SNMP_CMD_REALWALK) { + } else if (st == SNMP_CMD_REALWALK && vars->type != SNMP_ENDOFMIBVIEW && vars->type != SNMP_NOSUCHOBJECT && vars->type != SNMP_NOSUCHINSTANCE) { #ifdef HAVE_NET_SNMP snprint_objid(buf2, sizeof(buf2), vars->name, vars->name_length); #else