From: Adam Dickmeiss Date: Mon, 26 Sep 2005 09:15:27 +0000 (+0000) Subject: Changed behavior of yaz-client's cancel command, so that it by default X-Git-Tag: YAZ.2.1.10~47 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=a598b7f4ca1ad3c0ffcd5924aea118abc3d36574 Changed behavior of yaz-client's cancel command, so that it by default does not wait for a response. But if 'cancel wait' is given it will wait anyway. --- diff --git a/client/client.c b/client/client.c index 258c338..cf8dfed 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.297 2005-09-21 19:46:33 adam Exp $ + * $Id: client.c,v 1.298 2005-09-26 09:15:27 adam Exp $ */ #include @@ -2776,7 +2776,11 @@ int cmd_cancel(const char *arg) Z_TriggerResourceControlRequest *req = apdu->u.triggerResourceControlRequest; bool_t rfalse = 0; - + char command[16]; + + *command = '\0'; + sscanf(arg, "%15s", command); + if (only_z3950()) return 0; if (session_initResponse && @@ -2792,7 +2796,9 @@ int cmd_cancel(const char *arg) send_apdu(apdu); printf("Sent cancel request\n"); - return 2; + if (!strcmp(command, "wait")) + return 2; + return 1; }