X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=src%2Fyaz-my-client.cpp;h=90504e2bee19e675feba49878c51b3d182e3b729;hp=e359be36a4ef3f93f31ab56ee7c7d66e8add4439;hb=6b22d0543d41bec8626f3ae7ac866bcab7de44bd;hpb=d508100e993ab5c9a415bd1826b939875dcfe91c diff --git a/src/yaz-my-client.cpp b/src/yaz-my-client.cpp index e359be3..90504e2 100644 --- a/src/yaz-my-client.cpp +++ b/src/yaz-my-client.cpp @@ -1,8 +1,6 @@ -/* - * Copyright (c) 1998-2007, Index Data. +/* This file is part of the yazpp toolkit. + * Copyright (C) 1998-2009 Index Data and Mike Taylor * See the file LICENSE for details. - * - * $Id: yaz-my-client.cpp,v 1.27 2007-04-12 15:00:33 adam Exp $ */ #include @@ -113,14 +111,10 @@ void usage(char *prog) char *MyClient::get_cookie(Z_OtherInformation **otherInfo) { - Z_OtherInformationUnit *oi; - - const int *oid = - yaz_string_to_oid(yaz_oid_std(), CLASS_USERINFO, OID_STR_COOKIE); + Z_OtherInformationUnit *oi = + update_otherInformation(otherInfo, 0, yaz_oid_userinfo_cookie, 1, 1); - if (oid && - (oi = update_otherInformation(otherInfo, 0, oid, 1, 1)) && - oi->which == Z_OtherInfo_characterInfo) + if (oi && oi->which == Z_OtherInfo_characterInfo) return oi->information.characterInfo; return 0; } @@ -558,6 +552,7 @@ int main(int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab