CVS update: php3/functions
| From: | steinm | Date: | Tue, 08 Jun 1999 14:50:55 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6720@lists.php.net to get a copy of this message | ||
Date: Tuesday June 8, 1999 @ 10:50
Author: steinm
Update of /repository/php3/functions
In directory php:/tmp/cvs-serv29919/functions
Modified Files:
hg_comm.c hw.c
Log Message:
- hw_modifyobject() hopefully fixed now
Index: php3/functions/hg_comm.c
diff -u php3/functions/hg_comm.c:1.21 php3/functions/hg_comm.c:1.22
--- php3/functions/hg_comm.c:1.21 Wed Jun 2 06:06:42 1999
+++ php3/functions/hg_comm.c Tue Jun 8 10:50:54 1999
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hg_comm.c,v 1.21 1999/06/02 10:06:42 steinm Exp $ */
+/* $Id: hg_comm.c,v 1.22 1999/06/08 14:50:54 steinm Exp $ */
/* #define HW_DEBUG */
@@ -1540,7 +1540,7 @@
return(-1);
}
- error = (int) *(retmsg->buf);
+ error = *((int *) retmsg->buf);
efree(retmsg->buf);
efree(retmsg);
Index: php3/functions/hw.c
diff -u php3/functions/hw.c:1.37 php3/functions/hw.c:1.38
--- php3/functions/hw.c:1.37 Wed Jun 2 06:06:42 1999
+++ php3/functions/hw.c Tue Jun 8 10:50:54 1999
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hw.c,v 1.37 1999/06/02 10:06:42 steinm Exp $ */
+/* $Id: hw.c,v 1.38 1999/06/08 14:50:54 steinm Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
#endif
@@ -1546,11 +1546,16 @@
set_swap(ptr->swap_on);
modification[strlen(modification)-1] = '\0';
-/* fprintf(stderr, "modifyobject: %s\n", modification); */
+ if(strlen(modification) == 0) {
+ ptr->lasterror = 0;
+ free(modification);
+ RETURN_TRUE;
+ }
+ fprintf(stderr, "modifyobject: %s\n", modification);
switch(mode) {
case 0:
- if (0 != (ptr->lasterror = send_lock(ptr->socket, id))) {
- if (0 != (ptr->lasterror = send_changeobject(ptr->socket, id, modification))) {
+ if (0 == (ptr->lasterror = send_lock(ptr->socket, id))) {
+ if (0 == (ptr->lasterror = send_changeobject(ptr->socket, id, modification))) {
if (0 != (ptr->lasterror = send_unlock(ptr->socket, id))) {
php3_error(E_WARNING,"Aiii, Changeobject failed and couldn't unlock object (id =
0x%X)", id);
free(modification);
@@ -1558,12 +1563,15 @@
}
free(modification);
RETURN_FALSE;
- }
- if (0 != (ptr->lasterror = send_unlock(ptr->socket, id))) {
- php3_error(E_WARNING,"Aiii, Changed object but couldn't unlock object (id =
0x%X)", id);
+ } else {
+ send_unlock(ptr->socket, id);
free(modification);
RETURN_FALSE;
}
+ } else {
+ php3_error(E_WARNING,"Could not lock object (id = 0x%X)", id);
+ free(modification);
+ RETURN_FALSE;
}
break;
case 1:
@@ -1580,7 +1588,7 @@
}
break;
default:
- php3_error(E_WARNING,"hw_modifyobject: Mode must be 0 or 1");
+ php3_error(E_WARNING,"hw_modifyobject: Mode must be 0 or 1 (recursive)");
}
free(modification);
RETURN_TRUE;