helly Wed Dec 11 05:37:53 2002 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/dba dba.c
Log:
MFH
Index: php4/ext/dba/dba.c
diff -u php4/ext/dba/dba.c:1.61.2.5 php4/ext/dba/dba.c:1.61.2.6
--- php4/ext/dba/dba.c:1.61.2.5 Tue Dec 10 18:03:24 2002
+++ php4/ext/dba/dba.c Wed Dec 11 05:37:53 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba.c,v 1.61.2.5 2002/12/10 23:03:24 helly Exp $ */
+/* $Id: dba.c,v 1.61.2.6 2002/12/11 10:37:53 helly Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -426,16 +426,21 @@
if (pmode[0] && (pmode[1]=='d' || pmode[1]=='l' || pmode[1]=='-')) { /* force
lock on db file or lck file or disable locking */
switch (pmode[1]) {
case 'd':
- if ((hptr->flags & DBA_LOCK_ALL) == 0) {
- php_error_docref2(NULL TSRMLS_CC,
Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_NOTICE, "Handler %s does locking
internally", hptr->name);
- }
lock_dbf = 1;
/* no break */
case 'l':
lock_flag = DBA_LOCK_ALL;
+ if ((hptr->flags & DBA_LOCK_ALL) == 0) {
+ php_error_docref2(NULL TSRMLS_CC,
+Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_NOTICE, "Handler %s does locking
+internally", hptr->name);
+ }
break;
default:
case '-':
+ if ((hptr->flags & DBA_LOCK_ALL) == 0) {
+ php_error_docref2(NULL TSRMLS_CC,
+Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "Locking cannot be disabled
+for handler %s", hptr->name);
+ FREENOW;
+ RETURN_FALSE;
+ }
lock_flag = 0;
break;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php