]> granicus.if.org Git - php/commitdiff
Fixing the php_info function.
authorHarrie Hazewinkel <harrie@php.net>
Mon, 11 Nov 2002 18:45:50 +0000 (18:45 +0000)
committerHarrie Hazewinkel <harrie@php.net>
Mon, 11 Nov 2002 18:45:50 +0000 (18:45 +0000)
Print UCD-SNMP when UCD-SNMP is used.
Print NET-SNMP when NET-SNMP is used.

ext/snmp/snmp.c

index 5a0ee9dffe6ca8ac3c19a3ae8677d1ab48bbe875..0ecf15043f496dd9b7a09ef95b26ff2fd676e916 100644 (file)
@@ -75,7 +75,6 @@
 #ifdef HAVE_NET_SNMP
 #include <net-snmp/net-snmp-config.h>
 #include <net-snmp/net-snmp-includes.h>
-#define VersionInfo NetSnmpVersionInfo
 #else
 #ifdef HAVE_DEFAULT_STORE_H
 #include "default_store.h"
@@ -154,8 +153,13 @@ PHP_MINIT_FUNCTION(snmp)
 PHP_MINFO_FUNCTION(snmp)
 {
        php_info_print_table_start();
+#ifdef HAVE_NET_SNMP
+       php_info_print_table_row(2, "NET-SNMP Support", "enabled");
+       php_info_print_table_row(2, "NET-SNMP Version", netsnmp_get_version());
+#else
        php_info_print_table_row(2, "UCD-SNMP Support", "enabled");
        php_info_print_table_row(2, "UCD-SNMP Version", VersionInfo);
+#endif
        php_info_print_table_end();
 }
 /* }}} */