Index: ossp-pkg/xds/regression-tests/xds-setbuffer.c RCS File: /v/ossp/cvs/ossp-pkg/xds/regression-tests/Attic/xds-setbuffer.c,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/xds/regression-tests/Attic/xds-setbuffer.c,v' 2>/dev/null --- xds-setbuffer.c 2001/07/18 17:37:49 1.2 +++ xds-setbuffer.c 2001/07/24 15:20:17 1.3 @@ -64,16 +64,16 @@ return 1; } - /* Give the library a buffer of 64 byte, call the engine once, get + /* Give the library a buffer of 32 byte, call the engine once, get the buffer back and see whether it has been enlarged or not. */ - buffer = malloc(64); + buffer_size = 32; + buffer = malloc(buffer_size); if (buffer == NULL) { printf("Failed to allocate my memory.\n"); return 1; } - buffer_size = 64; if (xds_setbuffer(xds, XDS_GIFT, buffer, buffer_size) != XDS_OK) { printf("xds_setbuffer() failed!\n"); @@ -89,7 +89,7 @@ printf("xds_getbuffer() failed!\n"); return 1; } - if (buffer_size == 64) + if (buffer_size < 64) { printf("xds_encode() did not enlarge the buffer after processing the callback\n"); printf("even though all capacity was used up!\n");