X-Git-Url: http://git.indexdata.com/?p=simpleserver-moved-to-github.git;a=blobdiff_plain;f=SimpleServer.xs;h=2abd8e4faa25e1ff4a9e357bb50791d08e0034f1;hp=3493be0286b6ebb21d0e33d81cc8ebe7f4a4f71d;hb=586fe28631368fca02c1c7bc29274f359e64396d;hpb=dc9e19f7a9e21e09bd1563530aa58d3df95cd189 diff --git a/SimpleServer.xs b/SimpleServer.xs index 3493be0..2abd8e4 100644 --- a/SimpleServer.xs +++ b/SimpleServer.xs @@ -1,5 +1,5 @@ /* - * $Id: SimpleServer.xs,v 1.80 2007-12-10 09:37:00 mike Exp $ + * $Id: SimpleServer.xs,v 1.85 2009-12-29 10:23:22 adam Exp $ * ---------------------------------------------------------------------- * * Copyright (c) 2000-2004, Index Data. @@ -865,7 +865,7 @@ int bend_delete(void *handle, bend_delete_rr *rr) 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++) { @@ -1119,7 +1119,6 @@ int bend_present(void *handle, bend_present_rr *rr) SV **temp; SV *err_code; SV *err_string; - SV *hits; SV *point; STRLEN len; Z_RecordComposition *composition; @@ -1210,9 +1209,6 @@ int bend_present(void *handle, bend_present_rr *rr) 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); @@ -1222,7 +1218,6 @@ int bend_present(void *handle, bend_present_rr *rr) 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); @@ -1233,7 +1228,6 @@ int bend_present(void *handle, bend_present_rr *rr) handle = zhandle; sv_free(err_code); sv_free(err_string); - sv_free(hits); sv_free( (SV*) href); return 0; @@ -1428,6 +1422,21 @@ int bend_explain(void *handle, bend_explain_rr *q) 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(); @@ -1482,7 +1491,7 @@ bend_initresult *bend_init(bend_initrequest *q) href = newHV(); - ### These should be given initial values from the client + /* ### These should be given initial values from the client */ hv_store(href, "IMP_ID", 6, newSVpv("", 0), 0); hv_store(href, "IMP_NAME", 8, newSVpv("", 0), 0); hv_store(href, "IMP_VER", 7, newSVpv("", 0), 0); @@ -1741,7 +1750,7 @@ yazlog(arg) 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)