X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=d4986d0dd9e6f2c2ab2ebe96486e3bb0b945c652;hb=bc9920b48da91d87e1c0e033a9151663998d6b6b;hp=88109e96fee80ac19f30b74b48977289ef937629;hpb=04554076c032387b85ca7c9017d724b875e7766f;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 88109e9..d4986d0 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.187 2003-04-29 21:04:46 adam Exp $ + * $Id: client.c,v 1.189 2003-04-29 21:20:33 adam Exp $ */ #include @@ -443,17 +443,6 @@ void cmd_open_remember_last_open_command(const char* arg, char* new_open_command } } -int cmd_open(const char *arg) -{ - static char cur_host[200]; - if (arg) - { - strncpy (cur_host, arg, sizeof(cur_host)-1); - cur_host[sizeof(cur_host)-1] = 0; - } - return session_connect(cur_host); -} - int session_connect(const char *arg) { void *add; @@ -523,6 +512,17 @@ int session_connect(const char *arg) return 0; } +int cmd_open(const char *arg) +{ + static char cur_host[200]; + if (arg) + { + strncpy (cur_host, arg, sizeof(cur_host)-1); + cur_host[sizeof(cur_host)-1] = 0; + } + return session_connect(cur_host); +} + void try_reconnect() { char* open_command; @@ -1930,7 +1930,6 @@ static int send_presentRequest(const char *arg) oident prefsyn; int nos = 1; int oid[OID_SIZE]; - char *p; char setstring[100]; req->referenceId = set_refid (out); @@ -2875,6 +2874,7 @@ static void initialize(void) struct timeval tv_start, tv_end; #endif +#if HAVE_XML2 static void handle_srw_response(Z_SRW_searchRetrieveResponse *res) { int i; @@ -2985,6 +2985,7 @@ static void http_response(Z_HTTP_Response *hres) close_session(); } } +#endif void wait_and_handle_response() { @@ -3100,10 +3101,12 @@ void wait_and_handle_response() close_session (); } } +#if HAVE_XML2 else if (gdu->which == Z_GDU_HTTP_Response) { http_response(gdu->u.HTTP_Response); } +#endif if (conn && !cs_more(conn)) break; }