/*
- * $Id: SimpleServer.xs,v 1.49 2006-07-21 22:14:12 mike Exp $
+ * $Id: SimpleServer.xs,v 1.52 2006-07-26 01:08:44 mike Exp $
* ----------------------------------------------------------------------
*
* Copyright (c) 2000-2004, Index Data.
}
else
{
+#if 0 /* For now ignore this error, which is ubiquitous in SRU */
+ fprintf(stderr, "complex is weird\n");
rr->errcode = 26;
return 0;
+#endif /*0*/
}
}
else
temp = hv_fetch(href, "REP_FORM", 8, 1);
rep_form = newSVsv(*temp);
- temp = hv_fetch(href, "SCHEMA", 8, 1);
- schema = newSVsv(*temp);
+ temp = hv_fetch(href, "SCHEMA", 6, 1);
+ if (temp != 0) {
+ schema = newSVsv(*temp);
+ ptr = SvPV(schema, length);
+ rr->schema = (char *)odr_malloc(rr->stream, length + 1);
+ strcpy(rr->schema, ptr);
+ }
temp = hv_fetch(href, "HANDLE", 6, 1);
point = newSVsv(*temp);
strcpy(ODR_basename, ptr);
rr->basename = ODR_basename;
- ptr = SvPV(schema, length);
- rr->schema = (char *)odr_malloc(rr->stream, length + 1);
- strcpy(rr->schema, ptr);
-
ptr = SvPV(rep_form, length);
ODR_oid_buf = (int *)odr_malloc(rr->stream, (MAX_OID + 1) * sizeof(int));
if (dotted2oid(ptr, ODR_oid_buf) == -1) /* Maximum number of OID elements exceeded */
if (rr->term->term->which == Z_Term_general)
{
term_len = rr->term->term->u.general->len;
- hv_store(href, "TERM", 4, newSVpv(rr->term->term->u.general->buf, term_len), 0);
+ hv_store(href, "TERM", 4, newSVpv((char*) rr->term->term->u.general->buf, term_len), 0);
} else {
rr->errcode = 229; /* Unsupported term type */
return 0;