X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=server%2Fseshigh.c;h=065b860a8393902813ca08e849d8a32cbef49f81;hb=b0555501e434d0f71f97ea17f282db2e795ff950;hp=601ff579f145070d64d3bf25efa98cf3e2897b30;hpb=ccb068efa655ace7835a122c1226356f2f933992;p=yaz-moved-to-github.git diff --git a/server/seshigh.c b/server/seshigh.c index 601ff57..065b860 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.156 2003-05-20 08:22:33 adam Exp $ + * $Id: seshigh.c,v 1.159 2003-05-24 19:34:43 adam Exp $ */ /* @@ -326,8 +326,10 @@ void ir_session(IOCHAN h, int event) odr_setbuf(assoc->decode, assoc->input_buffer, res, 0); if (!z_GDU(assoc->decode, &req->gdu_request, 0, 0)) { - yaz_log(LOG_LOG, "ODR error on incoming PDU: %s [near byte %d] ", + yaz_log(LOG_LOG, "ODR error on incoming PDU: %s [element %s] " + "[near byte %d] ", odr_errmsg(odr_geterror(assoc->decode)), + odr_getelement(assoc->decode), odr_offset(assoc->decode)); if (assoc->decode->error != OHTTP) { @@ -768,7 +770,7 @@ static char *uri_val(const char *path, const char *name, ODR o) const char *p1 = strchr(path, '='); if (!p1) break; - if (p1 - path == nlen && !memcmp(path, name, nlen)) + if ((size_t)(p1 - path) == nlen && !memcmp(path, name, nlen)) { size_t i = 0; char *ret; @@ -1381,8 +1383,9 @@ static int process_gdu_response(association *assoc, request *req, Z_GDU *res) } if (!z_GDU(assoc->encode, &res, 0, 0)) { - yaz_log(LOG_WARN, "ODR error when encoding response: %s", - odr_errmsg(odr_geterror(assoc->decode))); + yaz_log(LOG_WARN, "ODR error when decoding PDU: %s [element %s]", + odr_errmsg(odr_geterror(assoc->decode)), + odr_getelement(assoc->decode)); return -1; } req->response = odr_getbuf(assoc->encode, &req->len_response,