@@ -78,7 +78,6 @@ extern netsnmp_log_handler *logh_head;
78
78
#define SNMP_VALUE_OBJECT (1 << 1)
79
79
80
80
typedef struct snmp_session php_snmp_session ;
81
- #define PHP_SNMP_SESSION_RES_NAME "SNMP session"
82
81
83
82
#define PHP_SNMP_ADD_PROPERTIES (a , b ) \
84
83
{ \
@@ -113,8 +112,6 @@ static PHP_GINIT_FUNCTION(snmp);
113
112
/* constant - can be shared among threads */
114
113
static oid objid_mib [] = {1 , 3 , 6 , 1 , 2 , 1 };
115
114
116
- static int le_snmp_session ;
117
-
118
115
/* Handlers */
119
116
static zend_object_handlers php_snmp_object_handlers ;
120
117
@@ -185,13 +182,6 @@ static void netsnmp_session_free(php_snmp_session **session) /* {{{ */
185
182
}
186
183
/* }}} */
187
184
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
-
195
185
static void php_snmp_object_free_storage (zend_object * object ) /* {{{ */
196
186
{
197
187
php_snmp_object * intern = php_snmp_fetch_object (object );
@@ -1936,8 +1926,6 @@ PHP_MINIT_FUNCTION(snmp)
1936
1926
netsnmp_log_handler * logh ;
1937
1927
zend_class_entry ce , cex ;
1938
1928
1939
- le_snmp_session = zend_register_list_destructors_ex (php_snmp_session_destructor , NULL , PHP_SNMP_SESSION_RES_NAME , module_number );
1940
-
1941
1929
init_snmp ("snmpapp" );
1942
1930
/* net-snmp corrupts the CTYPE locale during initialization. */
1943
1931
setlocale (LC_CTYPE , "C" );
0 commit comments