X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;ds=inline;f=zlayer%2Fzaccess-yaz.c;h=bc09552ee42f0af7b6a457947747c140e431370e;hb=282ada9b1d5d1d336ea0b11c2c1c60a6d91f0adf;hp=c13bdf9b569abfd0a092917c2d3454d23803d33b;hpb=27fa95200e32c043a7c3da03c37382f384919a28;p=egate.git diff --git a/zlayer/zaccess-yaz.c b/zlayer/zaccess-yaz.c index c13bdf9..bc09552 100644 --- a/zlayer/zaccess-yaz.c +++ b/zlayer/zaccess-yaz.c @@ -1,10 +1,62 @@ /* + * Copyright (c) 1995, the EUROPAGATE consortium (see below). + * + * The EUROPAGATE consortium members are: + * + * University College Dublin + * Danmarks Teknologiske Videnscenter + * An Chomhairle Leabharlanna + * Consejo Superior de Investigaciones Cientificas + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation, in whole or in part, for any purpose, is hereby granted, + * provided that: + * + * 1. This copyright and permission notice appear in all copies of the + * software and its documentation. Notices of copyright or attribution + * which appear at the beginning of any file must remain unchanged. + * + * 2. The names of EUROPAGATE or the project partners may not be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * 3. Users of this software (implementors and gateway operators) agree to + * inform the EUROPAGATE consortium of their use of the software. This + * information will be used to evaluate the EUROPAGATE project and the + * software, and to plan further developments. The consortium may use + * the information in later publications. + * + * 4. Users of this software agree to make their best efforts, when + * documenting their use of the software, to acknowledge the EUROPAGATE + * consortium, and the role played by the software in their work. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * IN NO EVENT SHALL THE EUROPAGATE CONSORTIUM OR ITS MEMBERS BE LIABLE + * FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF + * ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA + * OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND + * ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE + * USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +/* * Europagate, 1995 * * Z39.50 API for the Email gateway - YAZ version * * $Log: zaccess-yaz.c,v $ - * Revision 1.7 1995/04/21 16:29:32 quinn + * Revision 1.10 1995/05/16 09:41:46 adam + * LICENSE. Uses new versions of odr_{set,get}buf. + * + * Revision 1.9 1995/05/03 10:15:43 quinn + * Fixed bug in the get_record loop - crashed when diagrec was received. + * + * Revision 1.8 1995/04/28 14:18:38 quinn + * *** empty log message *** + * + * Revision 1.7 1995/04/21 16:29:32 quinn * Fixed bugs. * * Revision 1.6 1995/04/21 12:58:36 adam @@ -79,7 +131,7 @@ static Z_APDU *get_apdu(struct zass *z, int *complete) return 0; } odr_reset(z->decode); - odr_setbuf(z->decode, z->inbuf, res); + odr_setbuf(z->decode, z->inbuf, res, 0); if (!z_APDU(z->decode, &ap, 0)) { gw_log(GW_LOG_WARN, ZASS_TYPE, "decode: %s", @@ -103,7 +155,7 @@ static int send_apdu(struct zass *z, Z_APDU *a) gw_log(GW_LOG_FATAL, ZASS_TYPE, "encoding initreq"); return -1; } - buf = odr_getbuf(z->encode, &len); + buf = odr_getbuf(z->encode, &len, NULL); if (cs_put(z->ass, buf, len) < 0) { gw_log(GW_LOG_FATAL, ZASS_TYPE, "cs_put"); @@ -144,7 +196,6 @@ static int send_initreq(struct zass *p, char *auth) } else init.idAuthentication = 0; - init.idAuthentication = 0; init.implementationId = ZASS_ID; sprintf(name, "%s (YAZ protocol layer)", ZASS_NAME); init.implementationName = name; @@ -508,8 +559,8 @@ void get_responserecords(zass_record ***p, Z_NamePlusRecordList *recs) gw_log(ZASS_DEBUG, ZASS_TYPE, "Got a record of %d bytes", r->u.octet_aligned->len); } + (*p) = &(**p)->next; } - (*p) = &(**p)->next; } }