/*
- * $Id: SimpleServer.xs,v 1.81 2007-12-20 13:52:06 mike Exp $
+ * $Id: SimpleServer.xs,v 1.86 2010-02-04 16:30:20 mike Exp $
* ----------------------------------------------------------------------
*
* Copyright (c) 2000-2004, Index Data.
if (rr->num_setnames > 1) {
rr->delete_status = 3; /* "System problem at target" */
/* There's no way to sent delete-msg using the GFS */
- return;
+ return 0;
}
for (i = 0; i < rr->num_setnames; i++) {
SV **temp;
SV *err_code;
SV *err_string;
- SV *hits;
SV *point;
STRLEN len;
Z_RecordComposition *composition;
hv_store(href, "NUMBER", 6, newSViv(rr->number), 0);
/*oid_dotted = oid2dotted(rr->request_format_raw);
hv_store(href, "REQ_FORM", 8, newSVpv((char *)oid_dotted->buf, oid_dotted->pos), 0);*/
- hv_store(href, "HITS", 4, newSViv(0), 0);
hv_store(href, "PID", 3, newSViv(getpid()), 0);
if (rr->comp)
{
temp = hv_fetch(href, "ERR_STR", 7, 1);
err_string = newSVsv(*temp);
- temp = hv_fetch(href, "HITS", 4, 1);
- hits = newSVsv(*temp);
-
temp = hv_fetch(href, "HANDLE", 6, 1);
point = newSVsv(*temp);
hv_undef(href);
rr->errcode = SvIV(err_code);
- rr->hits = SvIV(hits);
ptr = SvPV(err_string, len);
ODR_errstr = (char *)odr_malloc(rr->stream, len + 1);
handle = zhandle;
sv_free(err_code);
sv_free(err_string);
- sv_free(hits);
sv_free( (SV*) href);
return 0;
return 0;
}
+
+/*
+ * You'll laugh when I tell you this ... Astonishingly, it turns out
+ * that ActivePerl (which is widely used on Windows) has, in the
+ * header file Perl\lib\CORE\XSUB.h, the following heinous crime:
+ * # define open PerlLIO_open
+ * This of course screws up the use of the "open" member of the
+ * Z_IdAuthentication structure below, so we have to undo this
+ * brain-damage.
+ */
+#ifdef open
+#undef open
+#endif
+
+
bend_initresult *bend_init(bend_initrequest *q)
{
int dummy = simpleserver_clone();
STRLEN len;
char *ptr;
ptr = SvPV(arg, len);
- yaz_log(YLOG_LOG, "%.*s", len, ptr);
+ yaz_log(YLOG_LOG, "%.*s", (int) len, ptr);
int
yaz_diag_srw_to_bib1(srw_code)