From: Boris Lytochkin Date: Fri, 4 Mar 2011 19:23:25 +0000 (+0000) Subject: * tune snmp2_walk.phpt X-Git-Tag: php-5.4.0alpha1~191^2~187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e600b817e9252995bb3da6a13dbe39dc80b3c58;p=php * tune snmp2_walk.phpt * more net-snmp v5.3 compatibility (OPAQUE_SPECIAL_TYPES) --- diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 14ff21455e..d0c972b5f0 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -654,7 +654,7 @@ static void php_snmp_getvalue(struct variable_list *vars, zval *snmpval TSRMLS_D ZVAL_STRING(val, buf, 1); break; -#ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES +#if defined(NETSNMP_WITH_OPAQUE_SPECIAL_TYPES) || defined(OPAQUE_SPECIAL_TYPES) case ASN_OPAQUE_FLOAT: /* 0x78, asn1.h */ snprintf(buf, buflen, "%f", *vars->val.floatVal); ZVAL_STRING(val, buf, 1); diff --git a/ext/snmp/tests/snmp2_walk.phpt b/ext/snmp/tests/snmp2_walk.phpt index e34fbe9e67..3981676eb1 100644 --- a/ext/snmp/tests/snmp2_walk.phpt +++ b/ext/snmp/tests/snmp2_walk.phpt @@ -68,7 +68,7 @@ bool(false) Checking working Single OID %unicode|string%(5) "array" -int(32) +int(%d) %unicode|string%(6) "string" %unicode|string%(6) "string" Single OID in array