SOURCES: apr_dbd_mysql.c - don't crash when connection to server i...

arekm arekm at pld-linux.org
Wed Dec 21 23:43:04 CET 2005


Author: arekm                        Date: Wed Dec 21 22:43:04 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- don't crash when connection to server is not possible

---- Files affected:
SOURCES:
   apr_dbd_mysql.c (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/apr_dbd_mysql.c
diff -u SOURCES/apr_dbd_mysql.c:1.1 SOURCES/apr_dbd_mysql.c:1.2
--- SOURCES/apr_dbd_mysql.c:1.1	Wed Dec 21 23:06:29 2005
+++ SOURCES/apr_dbd_mysql.c	Wed Dec 21 23:42:58 2005
@@ -563,7 +563,7 @@
                                    fields[1].value, fields[2].value,
                                    fields[3].value, port,
                                    fields[5].value, 0);
-    return sql;
+    return sql->conn ? sql : NULL;
 }
 static apr_status_t dbd_mysql_close(apr_dbd_t *handle)
 {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/apr_dbd_mysql.c?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list