dmitry Thu Feb 19 11:46:53 2004 EDT Modified files: /php-src/ext/soap php_sdl.c Log: WSDL caching bugs were fixed http://cvs.php.net/diff.php/php-src/ext/soap/php_sdl.c?r1=1.63&r2=1.64&ty=u Index: php-src/ext/soap/php_sdl.c diff -u php-src/ext/soap/php_sdl.c:1.63 php-src/ext/soap/php_sdl.c:1.64 --- php-src/ext/soap/php_sdl.c:1.63 Thu Feb 19 03:21:12 2004 +++ php-src/ext/soap/php_sdl.c Thu Feb 19 11:46:52 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.c,v 1.63 2004/02/19 08:21:12 dmitry Exp $ */ +/* $Id: php_sdl.c,v 1.64 2004/02/19 16:46:52 dmitry Exp $ */ #include "php_soap.h" #include "libxml/uri.h" @@ -954,10 +954,10 @@ return ctx.sdl; } -#define WSDL_CACHE_VERSION 06 +#define WSDL_CACHE_VERSION 07 #define WSDL_CACHE_GET(ret,type,buf) memcpy(&ret,*buf,sizeof(type)); *buf += sizeof(type); -#define WSDL_CACHE_GET_INT(ret,buf) ret = ((int)(*buf)[0])|((int)(*buf)[1]<<8)|((int)(*buf)[2]<<16)|((int)(*buf)[3]<<24); *buf += 4; +#define WSDL_CACHE_GET_INT(ret,buf) ret = ((unsigned char)(*buf)[0])|((unsigned char)(*buf)[1]<<8)|((unsigned char)(*buf)[2]<<16)|((int)(*buf)[3]<<24); *buf += 4; #define WSDL_CACHE_GET_1(ret,type,buf) ret = (type)(**buf); (*buf)++; #define WSDL_CACHE_GET_N(ret,n,buf) memcpy(ret,*buf,n); *buf += n; #define WSDL_CACHE_SKIP(n,buf) *buf += n; @@ -975,7 +975,7 @@ int len; WSDL_CACHE_GET_INT(len, in); - if (len == 0) { + if (len == 0x7fffffff) { return NULL; } else { s = emalloc(len+1); @@ -1487,7 +1487,7 @@ int function_num; WSDL_CACHE_GET_INT(function_num, &in); - sdl_deserialize_key(sdl->requests, functions[function_num], &in); + sdl_deserialize_key(sdl->requests, functions[function_num-1], &in); i--; } } @@ -1506,12 +1506,12 @@ if (str) { i = strlen(str); + WSDL_CACHE_PUT_INT(i, out); + if (i > 0) { + WSDL_CACHE_PUT_N(str, i, out); + } } else { - i = 0; - } - WSDL_CACHE_PUT_INT(i, out); - if (i > 0) { - WSDL_CACHE_PUT_N(str, i, out); + WSDL_CACHE_PUT_INT(0x7fffffff, out); } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php