summaryrefslogtreecommitdiff
path: root/ext/mssql
diff options
context:
space:
mode:
authorFrank M. Kromann <fmk@php.net>2002-01-03 23:08:21 +0000
committerFrank M. Kromann <fmk@php.net>2002-01-03 23:08:21 +0000
commit5d0ac50c8b1356999c0ce93e912c40dac832c72b (patch)
treef27eb0e107656843f9bafef6deed15522d347c62 /ext/mssql
parentd63edeba21e2aebb2c34924db15a525c17f550ce (diff)
downloadphp-git-5d0ac50c8b1356999c0ce93e912c40dac832c72b.tar.gz
Making error handling thread safe. Thanks to Paco Ortiz <fjortiz@comunet.es>
Diffstat (limited to 'ext/mssql')
-rw-r--r--ext/mssql/php_mssql.c6
1 files changed, 3 insertions, 3 deletions
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);
}