#include "eventl.h"
#include "parameters.h"
-#include "pazpar2.h"
+#include "session.h"
#include "http.h"
#include "settings.h"
#include "client.h"
return;
}
wrbuf_rewind(c->wrbuf);
- if (!(rec = show_single(s->psession, idstr, &prev_r, &next_r)))
+ if (!(rec = show_single_start(s->psession, idstr, &prev_r, &next_r)))
{
if (session_active_clients(s->psession) == 0)
{
if (!r)
{
error(rs, PAZPAR2_RECORD_FAIL, "no record at offset given");
- return;
}
else
{
rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);
}
+ show_single_stop(s->psession, rec);
}
static void cmd_record_ready(void *data)
return;
}
- rl = show(s->psession, sp, startn, &numn, &total, &total_hits, c->nmem);
+
+ rl = show_range_start(s->psession, sp, startn, &numn, &total, &total_hits);
wrbuf_rewind(c->wrbuf);
wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "<show>\n<status>OK</status>\n");
wrbuf_puts(c->wrbuf, "</hit>\n");
}
+ show_range_stop(s->psession, rl);
+
wrbuf_puts(c->wrbuf, "</show>\n");
rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);