summaryrefslogtreecommitdiff
path: root/ext/mssql/php_mssql.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-10-22 22:42:54 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-10-22 22:42:54 +0000
commit21a455a4540078c653ceee5111de9b0ed946bd51 (patch)
tree9ad5f48e81d80b1f48c40e67416bc091afa96a6d /ext/mssql/php_mssql.c
parentac26a3f8932473e643926c484ce3145e4383723a (diff)
downloadphp-git-21a455a4540078c653ceee5111de9b0ed946bd51.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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c
index 442c4702a9..f3eddd4d82 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");