From: Adam Dickmeiss Date: Tue, 19 Jan 2010 08:56:16 +0000 (+0100) Subject: GFS: Use zget_APDU rather than zget_Close X-Git-Tag: v4.0.0~23 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=ff9ef529da0b40f6aa6ff73954933beb93c08186;p=yaz-moved-to-github.git GFS: Use zget_APDU rather than zget_Close Use zget_APDU rather than zget_Close.. Because zget_Close should not be public and because using zget_APDU is shorter. --- diff --git a/src/seshigh.c b/src/seshigh.c index 7f9b7cb..594b21c 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -222,8 +222,8 @@ void destroy_association(association *h) static void do_close_req(association *a, int reason, char *message, request *req) { - Z_APDU apdu; - Z_Close *cls = zget_Close(a->encode); + Z_APDU *apdu = zget_APDU(a->encode, Z_APDU_close); + Z_Close *cls = apdu->u.close; /* Purge request queue */ while (request_deq(&a->incoming)); @@ -232,11 +232,9 @@ static void do_close_req(association *a, int reason, char *message, { yaz_log(log_requestdetail, "Sending Close PDU, reason=%d, message=%s", reason, message ? message : "none"); - apdu.which = Z_APDU_close; - apdu.u.close = cls; *cls->closeReason = reason; cls->diagnosticInformation = message; - process_z_response(a, req, &apdu); + process_z_response(a, req, apdu); iochan_settimeout(a->client_chan, 20); } else