return SUCCESS;
}
+void _php_odbc_shutdown(void *data)
+{
+ ELS_FETCH();
+
+ /* Close all statements before connection */
+
+ /* this is not the nice way of doing it - we should use reference counting
+ of the parent handles */
+
+ zend_hash_apply(&EG(regular_list), (int (*)(void *)) _odbc_stmt_cleanup);
+}
PHP_RINIT_FUNCTION(odbc)
{
ODBCG(defConn) = -1;
ODBCG(num_links) = ODBCG(num_persistent);
+
+ php_register_pre_request_shutdown(_php_odbc_shutdown, NULL);
+
return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(odbc)
{
- ELS_FETCH();
-
- /* Close all statements before connection */
- zend_hash_apply(&EG(regular_list), (int (*)(void *)) _odbc_stmt_cleanup);
return SUCCESS;
}