- Z_APDU *a = zget_APDU(global_parameters.odr_out, Z_APDU_presentRequest);
- int toget = 1;
- int start = cl->show_raw->position;
-
- assert(cl->show_raw);
-
- yaz_log(YLOG_DEBUG, "%s: trying to present %d record(s) from %d",
- client_get_url(cl), toget, start);
-
- a->u.presentRequest->resultSetStartPoint = &start;
- a->u.presentRequest->numberOfRecordsRequested = &toget;
-
- if (cl->show_raw->syntax) // syntax is optional
- a->u.presentRequest->preferredRecordSyntax =
- yaz_string_to_oid_odr(yaz_oid_std(),
- CLASS_RECSYN, cl->show_raw->syntax,
- global_parameters.odr_out);
- if (cl->show_raw->esn) // element set is optional
- {
- Z_ElementSetNames *elementSetNames =
- odr_malloc(global_parameters.odr_out, sizeof(*elementSetNames));
- Z_RecordComposition *compo =
- odr_malloc(global_parameters.odr_out, sizeof(*compo));
- a->u.presentRequest->recordComposition = compo;
-
- compo->which = Z_RecordComp_simple;
- compo->u.simple = elementSetNames;
-
- elementSetNames->which = Z_ElementSetNames_generic;
- elementSetNames->u.generic =
- odr_strdup(global_parameters.odr_out, cl->show_raw->esn);
- }
- if (send_apdu(cl, a) >= 0)
- {
- cl->show_raw->active = 1;
- cl->state = Client_Presenting;
- }
- else