2 * Copyright (C) 1994-1998, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.9 2003-02-12 15:06:43 adam
8 * SOAP, SRW codecs and HTTP transport for YAZ using libxml2.
9 * Updated ASN.1 for Z39.50 amendment String Identifiers for Schemas.
11 * Revision 1.8 2001/07/19 19:51:41 adam
12 * Added typecasts to make C++ happy.
14 * Revision 1.7 1999/11/30 13:47:12 adam
15 * Improved installation. Moved header files to include/yaz.
17 * Revision 1.6 1998/02/11 11:53:35 adam
18 * Changed code so that it compiles as C++.
20 * Revision 1.5 1998/02/10 11:03:56 adam
21 * Added support for extended handlers in backend server interface.
23 * Revision 1.4 1997/10/27 13:55:03 adam
24 * Fixed memory leak: member response wasn't freed when queue
27 * Revision 1.3 1997/09/01 08:53:00 adam
28 * New windows NT/95 port using MSV5.0. The test server 'ztest' was
29 * moved a separate directory. MSV5.0 project server.dsp created.
30 * As an option, the server can now operate as an NT service.
32 * Revision 1.2 1995/11/01 13:54:57 quinn
35 * Revision 1.1 1995/05/15 12:12:22 quinn
42 * Simple queue management.
44 * We also use the request-freelist to store encoding buffers, rather than
45 * freeing and xmalloc'ing them on each cycle.
50 #include <yaz/xmalloc.h>
53 void request_enq(request_q *q, request *r)
63 request *request_head(request_q *q)
68 request *request_deq(request_q *q)
74 q->head = q->head->next;
81 void request_initq(request_q *q)
83 q->head = q->tail = q->list = 0;
87 void request_delq(request_q *q)
89 request *r1, *r = q->list;
99 request *request_get(request_q *q)
101 request *r = q->list;
107 if (!(r = (request *)xmalloc(sizeof(*r))))
110 r->size_response = 0;
120 r->state = REQUEST_IDLE;
125 void request_release(request *r)