Fixed memory bug.
authorSebastian Hammer <quinn@indexdata.com>
Mon, 15 May 1995 13:25:10 +0000 (13:25 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Mon, 15 May 1995 13:25:10 +0000 (13:25 +0000)
server/Makefile
server/seshigh.c
util/dmalloc.c

index cbb5d81..643047d 100644 (file)
@@ -1,12 +1,11 @@
 # Copyright (C) 1994, Index Data I/S 
 # All rights reserved.
 # Sebastian Hammer, Adam Dickmeiss
 # 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
 
 
 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
 
 SHELL=/bin/sh
 INCLUDE=-I../include -I. -I../../xtimosi/src -I../../alex/include
index fb7a583..5d17c40 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: seshigh.c,v $
  * 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
  * 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);
            /* 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",
            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.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;
 }
     resp.userInformationField = 0;
     return &apdu;
 }
index e8d693f..c2453a8 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: dmalloc.c,v $
  * 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
  * 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));
        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;
     r += 2 * sizeof(long);
     memcpy(r + nbytes, &tail, sizeof(long));
     return r;