From: Frank M. Kromann Date: Thu, 3 Jan 2002 23:08:21 +0000 (+0000) Subject: Making error handling thread safe. Thanks to Paco Ortiz X-Git-Tag: PRE_ISSET_PATCH~316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d0ac50c8b1356999c0ce93e912c40dac832c72b;p=php Making error handling thread safe. Thanks to Paco Ortiz --- diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 7b73306f55..a23ab00df9 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -306,9 +306,6 @@ PHP_MINIT_FUNCTION(mssql) REGISTER_LONG_CONSTANT("SQLFLT8",SQLFLT8, CONST_CS | CONST_PERSISTENT); /* END MSSQL data types for mssql_sp_bind */ - dberrhandle((DBERRHANDLE_PROC) php_mssql_error_handler); - dbmsghandle((DBMSGHANDLE_PROC) php_mssql_message_handler); - return SUCCESS; } @@ -441,6 +438,9 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) RETURN_FALSE; } + dbprocerrhandle(mssql.login, (DBERRHANDLE_PROC) php_mssql_error_handler); + dbprocmsghandle(mssql.login, (DBMSGHANDLE_PROC) php_mssql_message_handler); + if (user) { DBSETLUSER(mssql.login,user); }