X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fclient.c;h=a57f354d99afdfe7ace32dbb77cde893de03a0db;hp=83747073633531d02c51c53dc3c74c95405f8ec6;hb=b258a14997c70bf78310b2e094eb6bcf14b26a55;hpb=94c77ca831e55b3dee31184347f25dd0583085d2 diff --git a/client/client.c b/client/client.c index 8374707..a57f354 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.204 2003-07-18 22:41:25 mike Exp $ + * $Id: client.c,v 1.205 2003-07-23 12:57:22 mike Exp $ */ #include @@ -590,9 +590,14 @@ int cmd_authentication(const char *arg) if (r == 1) { auth = &au; - au.which = Z_IdAuthentication_open; - au.u.open = user; - printf("Authentication set to Open (%s)\n", user); + if (!strcmp(user, "-")) { + au.which = Z_IdAuthentication_anonymous; + printf("Authentication set to Anonymous\n"); + } else { + au.which = Z_IdAuthentication_open; + au.u.open = user; + printf("Authentication set to Open (%s)\n", user); + } } if (r == 2) {