X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Frequestq.c;h=9af3fe1018986af6aeaa04a9003aaa1b27a592d7;hp=1290b5990f1118ffba858ad173f8ab3b6bcd96c7;hb=a6b61b9f8b6576e8159a4e7e6aee88bba7e5d07d;hpb=fb6d99a0c7e07d9cc4a315c447deaf6564a85505 diff --git a/src/requestq.c b/src/requestq.c index 1290b59..9af3fe1 100644 --- a/src/requestq.c +++ b/src/requestq.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2005, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) Index Data * See the file LICENSE for details. - * - * $Id: requestq.c,v 1.4 2005-06-25 15:46:04 adam Exp $ */ /** * \file requestq.c @@ -11,6 +9,9 @@ * We also use the request-freelist to store encoding buffers, rather than * freeing and xmalloc'ing them on each cycle. */ +#if HAVE_CONFIG_H +#include +#endif #include @@ -77,8 +78,6 @@ request *request_get(request_q *q) r->size_response = 0; } r->q = q; - r->len_refid = 0; - r->refid = 0; r->gdu_request = 0; r->apdu_request = 0; r->request_mem = 0; @@ -92,6 +91,8 @@ request *request_get(request_q *q) void request_release(request *r) { request_q *q = r->q; + if (r->request_mem) + nmem_destroy(r->request_mem); r->next = q->list; q->list = r; } @@ -99,6 +100,7 @@ void request_release(request *r) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab