From: Ilia Alshanetsky Date: Mon, 22 Oct 2007 22:42:43 +0000 (+0000) Subject: Fixed bug #4294 (Move *timeout initialization from RINIT to connect time) X-Git-Tag: RELEASE_1_3_1~820 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3b5b118b6cc4345b5a0d57c7fe48b022a520a61;p=php Fixed bug #4294 (Move *timeout initialization from RINIT to connect time) --- diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index c0de0b530e..39f5be6fc3 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");