]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #4294 (Move *timeout initialization from RINIT to connect
authorIlia Alshanetsky <iliaa@php.net>
Mon, 22 Oct 2007 22:43:44 +0000 (22:43 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 22 Oct 2007 22:43:44 +0000 (22:43 +0000)
time)

NEWS
ext/mssql/php_mssql.c

diff --git a/NEWS b/NEWS
index 5fce184c49fa93ecba168b220bbc35cdbfd6c458..fe2a66dfae2d48fe0aec03a81df6919b972ad0d8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,8 @@ PHP                                                                        NEWS
 
 - Fixed bug #43020 (Warning message is missing with shuffle() and more
   than one argument). (Scott)
+- Fixed bug #4294 (Move *timeout initialization from RINIT to connect time).
+  (Ilia)
 - Fixed bug #42917 (PDO::FETCH_KEY_PAIR doesn't work with setFetchMode).
   (Ilia)
 - Fixed bug #42890 (Constant "LIST" defined by mysqlclient and c-client).
index 417c3110c4d3589e9b12a887da283656272b45c4..cf5bf233162c4269f4ae023ef8932c7cbbb636e2 100644 (file)
@@ -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");