Skip to content

Commit 4912462

Browse files
committed
Fix to make the MIB tree re-initialisation work
1 parent 99abcff commit 4912462

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/snmp/snmp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,10 @@ PHP_FUNCTION(snmp_read_mib)
16401640
/* {{{ Resets the MIB tree using the MIBDIRS, MIBS and MIBFILES environment variables. */
16411641
PHP_FUNCTION(snmp_init_mib)
16421642
{
1643+
// Destroy the old MIB tree and set the internal MIB directory list to NULL
16431644
shutdown_mib();
1645+
netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_MIBDIRS, NULL);
1646+
// Initialise the new MIB tree
16441647
init_mib();
16451648
}
16461649
/* }}} */

0 commit comments

Comments
 (0)