CVS update: php3/functions

From: Date: Tue, 04 May 1999 16:08:47 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-5365@lists.php.net to get a copy of this message
Date: Tuesday May 4, 1999 @ 12:08 Author: steinm Update of /repository/php3/functions In directory php:/tmp/cvs-serv26948/functions Modified Files: hw.c Log Message: - hw_modifyobect() should now be stable Index: php3/functions/hw.c diff -u php3/functions/hw.c:1.30 php3/functions/hw.c:1.31 --- php3/functions/hw.c:1.30 Fri Apr 30 06:29:17 1999 +++ php3/functions/hw.c Tue May 4 12:08:47 1999 @@ -23,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hw.c,v 1.30 1999/04/30 10:29:17 steinm Exp $ */ +/* $Id: hw.c,v 1.31 1999/05/04 16:08:47 steinm Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" #endif @@ -910,6 +910,9 @@ case FLDEXISTS: sprintf(errstr, "Attribute exists"); break; + case NOLANGUAGE: + sprintf(errstr, "No or unknown language specified"); + break; default: sprintf(errstr, "Unknown error: %d", ptr->lasterror); } @@ -1415,7 +1418,7 @@ case IS_STRING: if(strlen(data->value.str.val) > 0) { snprintf(addattribute, BUFFERLEN, "add %s=%s", key, data->value.str.val); -fprintf(stderr, "add: %s\n", addattribute); +/* fprintf(stderr, "add: %s\n", addattribute); */ noinsert = 0; } break; @@ -1451,7 +1454,6 @@ } else if(strarr[i] == '=') ptr1[-1] = ':'; } - *ptr1++ = '\n'; *ptr1 = '\0'; strncpy(addattribute, ptr, BUFFERLEN); noinsert = 0; @@ -1541,11 +1543,13 @@ set_swap(ptr->swap_on); modification[strlen(modification)-1] = '\0'; - fprintf(stderr, "modifyobject: %s\n", modification); +// fprintf(stderr, "modifyobject: %s\n", modification); switch(mode) { case 0: - if (0 != (ptr->lasterror = send_changeobject(ptr->socket, id, modification))) + if (0 != (ptr->lasterror = send_changeobject(ptr->socket, id, modification))) { RETURN_FALSE; + free(modification); + } break; case 1: /* WARNING: send_groupchangobject() only works right, if each attribute @@ -1555,8 +1559,10 @@ Doing a 'rem Rights\add Rights=R:a' will fail completely if the attribute Rights is not there already. */ - if (0 != (ptr->lasterror = send_groupchangeobject(ptr->socket, id, modification))) + if (0 != (ptr->lasterror = send_groupchangeobject(ptr->socket, id, modification))) { RETURN_FALSE; + free(modification); + } break; default: php3_error(E_WARNING,"hw_modifyobject: Mode must be 0 or 1"); -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5365) next »