diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-10-22 22:43:44 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-10-22 22:43:44 +0000 |
commit | 521048a9aebbe9355cf9d6c7eb0cbb6f719e1e65 (patch) | |
tree | a40f8d62f76bd892cdd2d835e8a627d307118370 /ext/mssql/php_mssql.c | |
parent | 4846f7e349ca5908916fd63bab36875aed9a529c (diff) | |
download | php-git-521048a9aebbe9355cf9d6c7eb0cbb6f719e1e65.tar.gz |
MFB: Fixed bug #4294 (Move *timeout initialization from RINIT to connect
time)
Diffstat (limited to 'ext/mssql/php_mssql.c')
-rw-r--r-- | ext/mssql/php_mssql.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 417c3110c4..cf5bf23316 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -345,9 +345,7 @@ PHP_RINIT_FUNCTION(mssql) MS_SQL_G(min_error_severity) = MS_SQL_G(cfg_min_error_severity); MS_SQL_G(min_message_severity) = MS_SQL_G(cfg_min_message_severity); if (MS_SQL_G(connect_timeout) < 1) MS_SQL_G(connect_timeout) = 1; - dbsetlogintime(MS_SQL_G(connect_timeout)); if (MS_SQL_G(timeout) < 0) MS_SQL_G(timeout) = 60; - dbsettime(MS_SQL_G(timeout)); if (MS_SQL_G(max_procs) != -1) { dbsetmaxprocs((TDS_SHORT)MS_SQL_G(max_procs)); } @@ -468,6 +466,9 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) RETURN_FALSE; } + dbsetlogintime(MS_SQL_G(connect_timeout)); + dbsettime(MS_SQL_G(timeout)); + /* set a DBLOGIN record */ if ((mssql.login = dblogin()) == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate login record"); |