@@ -78,7 +78,6 @@ extern netsnmp_log_handler *logh_head;
7878#define SNMP_VALUE_OBJECT (1 << 1)
7979
8080typedef struct snmp_session php_snmp_session ;
81- #define PHP_SNMP_SESSION_RES_NAME "SNMP session"
8281
8382#define PHP_SNMP_ADD_PROPERTIES (a , b ) \
8483{ \
@@ -113,8 +112,6 @@ static PHP_GINIT_FUNCTION(snmp);
113112/* constant - can be shared among threads */
114113static oid objid_mib [] = {1 , 3 , 6 , 1 , 2 , 1 };
115114
116- static int le_snmp_session ;
117-
118115/* Handlers */
119116static zend_object_handlers php_snmp_object_handlers ;
120117
@@ -185,13 +182,6 @@ static void netsnmp_session_free(php_snmp_session **session) /* {{{ */
185182}
186183/* }}} */
187184
188- static void php_snmp_session_destructor (zend_resource * rsrc ) /* {{{ */
189- {
190- php_snmp_session * session = (php_snmp_session * )rsrc -> ptr ;
191- netsnmp_session_free (& session );
192- }
193- /* }}} */
194-
195185static void php_snmp_object_free_storage (zend_object * object ) /* {{{ */
196186{
197187 php_snmp_object * intern = php_snmp_fetch_object (object );
@@ -1936,8 +1926,6 @@ PHP_MINIT_FUNCTION(snmp)
19361926 netsnmp_log_handler * logh ;
19371927 zend_class_entry ce , cex ;
19381928
1939- le_snmp_session = zend_register_list_destructors_ex (php_snmp_session_destructor , NULL , PHP_SNMP_SESSION_RES_NAME , module_number );
1940-
19411929 init_snmp ("snmpapp" );
19421930 /* net-snmp corrupts the CTYPE locale during initialization. */
19431931 setlocale (LC_CTYPE , "C" );
0 commit comments