From: Sebastian Hammer Date: Mon, 15 May 1995 13:25:10 +0000 (+0000) Subject: Fixed memory bug. X-Git-Tag: YAZ.1.8~1043 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=9e4d074b5d72a383addc86a2c7e76ed60d3c4883 Fixed memory bug. --- diff --git a/server/Makefile b/server/Makefile index cbb5d81..643047d 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,12 +1,11 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.21 1995-05-15 11:56:36 quinn Exp $ +# $Id: Makefile,v 1.22 1995-05-15 13:25:10 quinn Exp $ LIBDIR=../lib -# Uncomment this when you want to use XTIMOSI -LIBMOSI=../../xtimosi/src/libmosi.a $(LIBDIR)/librfc.a +#LIBMOSI=../../xtimosi/src/libmosi.a $(LIBDIR)/librfc.a SHELL=/bin/sh INCLUDE=-I../include -I. -I../../xtimosi/src -I../../alex/include diff --git a/server/seshigh.c b/server/seshigh.c index fb7a583..5d17c40 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: seshigh.c,v $ - * Revision 1.22 1995-05-15 11:56:39 quinn + * Revision 1.23 1995-05-15 13:25:10 quinn + * Fixed memory bug. + * + * Revision 1.22 1995/05/15 11:56:39 quinn * Asynchronous facilities. Restructuring of seshigh code. * * Revision 1.21 1995/05/02 08:53:19 quinn @@ -261,8 +264,7 @@ void ir_session(IOCHAN h, int event) /* we got a complete PDU. Let's decode it */ req = request_get(); /* get a new request structure */ odr_reset(assoc->decode); - odr_setbuf(assoc->decode, assoc->input_buffer, - assoc->input_apdu_len, 0); + odr_setbuf(assoc->decode, assoc->input_buffer, res, 0); if (!z_APDU(assoc->decode, &req->request, 0)) { logf(LOG_WARN, "ODR error: %s", @@ -510,7 +512,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) resp.result = &result; resp.implementationId = "YAZ"; resp.implementationName = "Index Data/YAZ Generic Frontend Server"; - resp.implementationVersion = "$Revision: 1.22 $"; + resp.implementationVersion = "$Revision: 1.23 $"; resp.userInformationField = 0; return &apdu; } diff --git a/util/dmalloc.c b/util/dmalloc.c index e8d693f..c2453a8 100644 --- a/util/dmalloc.c +++ b/util/dmalloc.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dmalloc.c,v $ - * Revision 1.3 1995-05-15 11:56:55 quinn + * Revision 1.4 1995-05-15 13:25:13 quinn + * Fixed memory bug. + * + * Revision 1.3 1995/05/15 11:56:55 quinn * Debuggng & adjustments. * * Revision 1.2 1995/04/10 10:23:50 quinn @@ -75,11 +78,6 @@ void *d_realloc(char *file, int line, char *ptr, int nbytes) file, line, len, nbytes, p, r + 2 * sizeof(long)); memcpy(r, &head, sizeof(long)); memcpy(r + sizeof(long), &nlen, sizeof(long)); - if (r != ptr - 2 * sizeof(long)) - { - memcpy(r + 2 * sizeof(long), ptr, len); - memcpy(ptr - 2 * sizeof(long), &freed, sizeof(long)); - } r += 2 * sizeof(long); memcpy(r + nbytes, &tail, sizeof(long)); return r;