X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=cbb48706708be78405b2fa2380965f4f059f6206;hb=3eb8be5cd44ecdbd68ec3ca8a54ec86691ff9a4d;hp=59c48a06d920bc89cd3e298e37a6ae7b7013530f;hpb=0c4bd81e2e56724de1adbbc753f812328fb20e3c;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 59c48a0..cbb4870 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.351 2007-08-24 13:25:14 adam Exp $ + * $Id: client.c,v 1.353 2007-11-21 13:53:20 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -844,8 +844,8 @@ int cmd_authentication(const char *arg) au.which = Z_IdAuthentication_idPass; au.u.idPass = &idPass; idPass.groupId = NULL; - idPass.userId = user; - idPass.password = group; + idPass.userId = !strcmp(user, "-") ? 0 : user; + idPass.password = !strcmp(group, "-") ? 0 : group; printf("Authentication set to User (%s), Pass (%s)\n", user, group); } if (r == 3) @@ -2302,6 +2302,12 @@ static int cmd_update_Z3950(int version, int action_no, const char *recid, toKeep->databaseName = databaseNames[0]; toKeep->schema = 0; + if (record_schema) + { + toKeep->schema = yaz_string_to_oid_odr(yaz_oid_std(), + CLASS_SCHEMA, + record_schema, out); + } toKeep->elementSetName = 0; toKeep->action = (int *) odr_malloc(out, sizeof(*toKeep->action)); @@ -2344,6 +2350,12 @@ static int cmd_update_Z3950(int version, int action_no, const char *recid, toKeep->databaseName = databaseNames[0]; toKeep->schema = 0; + if (record_schema) + { + toKeep->schema = yaz_string_to_oid_odr(yaz_oid_std(), + CLASS_SCHEMA, + record_schema, out); + } toKeep->elementSetName = 0; toKeep->actionQualifier = 0; toKeep->action = (int *) odr_malloc(out, sizeof(*toKeep->action));