#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#if HAVE_NETDB_H
-#include <netdb.h>
-#endif
#include <signal.h>
-#include <ctype.h>
#include <assert.h>
#include <yaz/marcdisp.h>
#include <yaz/timing.h>
#endif
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include "pazpar2.h"
#include "client.h"
char *cqlquery; // used for SRU targets only
int hits;
int record_offset;
- int setno;
- int requestid; // ID of current outstanding request
int diagnostic;
enum client_state state;
struct show_raw *show_raw;
static const char *client_states[] = {
"Client_Connecting",
- "Client_Connected",
"Client_Idle",
"Client_Working",
"Client_Error",
"Client_Failed",
- "Client_Disconnected",
- "Client_Stopped",
- "Client_Continue"
+ "Client_Disconnected"
};
static struct client *client_freelist = 0;
return cl->pquery;
}
-void client_set_requestid(struct client *cl, int id)
-{
- cl->requestid = id;
-}
-
-
static void client_send_raw_present(struct client *cl);
int client_show_raw_begin(struct client *cl, int position,
}
else
{
+ cl->record_offset = 0;
cl->hits = ZOOM_resultset_size(resultset);
se->total_hits += cl->hits;
}
r->session = 0;
r->hits = 0;
r->record_offset = 0;
- r->setno = 0;
- r->requestid = -1;
r->diagnostic = 0;
r->state = Client_Disconnected;
r->show_raw = 0;
int client_is_active(struct client *cl)
{
- if (cl->connection && (cl->state == Client_Continue ||
- cl->state == Client_Connecting ||
+ if (cl->connection && (cl->state == Client_Connecting ||
cl->state == Client_Working))
return 1;
return 0;