mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Fixing the php_info function.
Print UCD-SNMP when UCD-SNMP is used. Print NET-SNMP when NET-SNMP is used.
This commit is contained in:
parent
155c453138
commit
e1f884c4bc
1 changed files with 5 additions and 1 deletions
|
@ -75,7 +75,6 @@
|
||||||
#ifdef HAVE_NET_SNMP
|
#ifdef HAVE_NET_SNMP
|
||||||
#include <net-snmp/net-snmp-config.h>
|
#include <net-snmp/net-snmp-config.h>
|
||||||
#include <net-snmp/net-snmp-includes.h>
|
#include <net-snmp/net-snmp-includes.h>
|
||||||
#define VersionInfo NetSnmpVersionInfo
|
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_DEFAULT_STORE_H
|
#ifdef HAVE_DEFAULT_STORE_H
|
||||||
#include "default_store.h"
|
#include "default_store.h"
|
||||||
|
@ -154,8 +153,13 @@ PHP_MINIT_FUNCTION(snmp)
|
||||||
PHP_MINFO_FUNCTION(snmp)
|
PHP_MINFO_FUNCTION(snmp)
|
||||||
{
|
{
|
||||||
php_info_print_table_start();
|
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 Support", "enabled");
|
||||||
php_info_print_table_row(2, "UCD-SNMP Version", VersionInfo);
|
php_info_print_table_row(2, "UCD-SNMP Version", VersionInfo);
|
||||||
|
#endif
|
||||||
php_info_print_table_end();
|
php_info_print_table_end();
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue