X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fseshigh.c;h=343eea282c634bb4da8d4de06dcce206ce88b3a4;hb=e15cbdedce45f8d4ce7642182899919cf9266984;hp=f398c25fec303996540f3619f2a3a0ee0d449069;hpb=1fe36f21be4d9ae40e62162651d144e0fd787df5;p=yaz-moved-to-github.git diff --git a/src/seshigh.c b/src/seshigh.c index f398c25..343eea2 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.61 2005-09-11 18:39:11 adam Exp $ + * $Id: seshigh.c,v 1.63 2005-09-16 09:16:40 adam Exp $ */ /** * \file seshigh.c @@ -243,6 +243,7 @@ static void do_close_req(association *a, int reason, char *message, request_release(req); yaz_log(log_requestdetail, "v2 client. No Close PDU"); iochan_setevent(a->client_chan, EVENT_TIMEOUT); /* force imm close */ + a->cs_put_mask = 0; } a->state = ASSOC_DEAD; } @@ -1775,7 +1776,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->implementation_name, odr_prepend(assoc->encode, "GFS", resp->implementationName)); - version = odr_strdup(assoc->encode, "$Revision: 1.61 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.63 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, @@ -1793,6 +1794,38 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) } if (log_request) { + if (!req->idAuthentication) + yaz_log(log_request, "Auth none"); + else if (req->idAuthentication->which == Z_IdAuthentication_open) + { + const char *open = req->idAuthentication->u.open; + const char *slash = strchr(open, '/'); + int len; + if (slash) + len = slash - open; + else + len = strlen(open); + yaz_log(log_request, "Auth open %.*s", len, open); + } + else if (req->idAuthentication->which == Z_IdAuthentication_idPass) + { + const char *user = req->idAuthentication->u.idPass->userId; + const char *group = req->idAuthentication->u.idPass->groupId; + yaz_log(log_request, "Auth idPass %s %s", + user ? user : "-", group ? group : "-"); + } + else if (req->idAuthentication->which + == Z_IdAuthentication_anonymous) + { + yaz_log(log_request, "Auth anonymous"); + } + else + { + yaz_log(log_request, "Auth other"); + } + } + if (log_request) + { WRBUF wr = wrbuf_alloc(); wrbuf_printf(wr, "Init "); if (binitres->errcode)