/*
- * $Id: SimpleServer.xs,v 1.75 2007-08-20 16:46:05 mike Exp $
+ * $Id: SimpleServer.xs,v 1.79 2007-09-10 14:50:31 mike Exp $
* ----------------------------------------------------------------------
*
* Copyright (c) 2000-2004, Index Data.
setMember(hv2, "attributeValue",
newSViv(*elem->value.numeric));
} else {
- assert(elem->which == Z_AttributeValue_complex);
- Z_ComplexAttribute *c = elem->value.complex;
+ Z_ComplexAttribute *c;
Z_StringOrNumeric *son;
+ assert(elem->which == Z_AttributeValue_complex);
+ c = elem->value.complex;
/* We ignore semantic actions and multiple values */
assert(c->num_list > 0);
son = c->list[0];
CV* handler_cv;
int i;
SV **temp;
+ SV *point;
dSP;
ENTER;
handler_cv = simpleserver_sv2cv(delete_ref);
if (rr->function == 1) {
- /* Delete all result setss in the session */
+ /* Delete all result sets in the session */
perl_call_sv( (SV *) handler_cv, G_SCALAR | G_DISCARD);
temp = hv_fetch(href, "STATUS", 6, 1);
rr->delete_status = SvIV(*temp);
} else {
rr->delete_status = 0;
+ /*
+ * For some reason, deleting two or more result-sets in
+ * one operation goes horribly wrong, and ### I don't have
+ * time to debug it right now.
+ */
+ 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;
+ }
+
for (i = 0; i < rr->num_setnames; i++) {
hv_store(href, "SETNAME", 7, newSVpv(rr->setnames[i], 0), 0);
perl_call_sv( (SV *) handler_cv, G_SCALAR | G_DISCARD);
SPAGAIN;
+ temp = hv_fetch(href, "HANDLE", 6, 1);
+ point = newSVsv(*temp);
+
+ hv_undef(href);
+
+ zhandle->handle = point;
+
sv_free( (SV*) href);
PUTBACK;
else
{
rr->errcode = 26;
+ rr->errstring = odr_strdup(rr->stream, "non-generic 'simple' composition");
+ return 0;
}
}
else if (composition->which == Z_RecordComp_complex)
else
{
#if 0 /* For now ignore this error, which is ubiquitous in SRU */
- fprintf(stderr, "complex is weird\n");
rr->errcode = 26;
+ rr->errstring = odr_strdup(rr->stream, "'complex' composition is not generic ESN");
return 0;
#endif /*0*/
}
else
{
rr->errcode = 26;
+ rr->errstring = odr_strdup(rr->stream, "composition neither simple nor complex");
return 0;
}
}
else
{
rr->errcode = 26;
+ rr->errstring = odr_strdup(rr->stream, "non-generic 'simple' composition");
return 0;
}
}
else
{
rr->errcode = 26;
+ rr->errstring = odr_strdup(rr->stream, "'complex' composition is not generic ESN");
return 0;
}
}
else
{
rr->errcode = 26;
+ rr->errstring = odr_strdup(rr->stream, "composition neither simple nor complex");
return 0;
}
}