use ExtUtils::MakeMaker;
-## $Id: Makefile.PL,v 1.12 2006-08-08 16:25:37 mike Exp $
+## $Id: Makefile.PL,v 1.13 2007-04-17 07:55:02 adam Exp $
my $yazconf = "yaz-config";
my $yazver = `$yazconf --version`;
chomp($yazver);
my ($major, $minor, $trivial) = split(/\./, $yazver);
# YAZ 2.1.14 is the first to propagate SRW/U addinfo correctly
-my ($needMaj, $needMin, $needTriv) = (2, 1, 24);
+my ($needMaj, $needMin, $needTriv) = (2, 1, 99);
#print "major=$major, minor=$minor, trivial=$trivial\n";
die "You have YAZ version $major.$minor.$trivial; " .
"you need $needMaj.$needMin.$needTriv or better."
/*
- * $Id: SimpleServer.xs,v 1.56 2007-03-05 11:47:16 mike Exp $
+ * $Id: SimpleServer.xs,v 1.57 2007-04-17 07:55:02 adam Exp $
* ----------------------------------------------------------------------
*
* Copyright (c) 2000-2004, Index Data.
oid2str(sattr->id, attrset_wr);
hv_store(sort_spec, "ATTRSET", 7,
newSVpv(attrset_wr->buf, attrset_wr->pos), 0);
- wrbuf_free(attrset_wr, 1);
+ wrbuf_destroy(attrset_wr);
hv_store(sort_spec, "SORT_ATTR", 9, newRV( sv_2mortal( (SV*) list ) ), 0);
oid2str(zspec->schema.oid, elementSpec);
hv_store(sort_spec, "ELEMENTSPEC_VALUE", 17,
newSVpv(elementSpec->buf, elementSpec->pos), 0);
- wrbuf_free(elementSpec, 1);
+ wrbuf_destroy(elementSpec);
}
else if (zspec->which == Z_Schema_uri)
{
sv_free( (SV*) aref);
sv_free( (SV*) href);
if (query)
- wrbuf_free(query, 1);
+ wrbuf_destroy(query);
PUTBACK;
FREETMPS;
LEAVE;
char *ODR_basename;
char *ODR_errstr;
int *ODR_oid_buf;
- oident *oid;
WRBUF oid_dotted;
Zfront_handle *zhandle = (Zfront_handle *)handle;
CV* handler_cv = 0;
if (rr->schema)
hv_store(href, "SCHEMA", 6, newSVpv(rr->schema, 0), 0);
temp = hv_store(href, "OFFSET", 6, newSViv(rr->number), 0);
- if (rr->request_format_raw != 0) {
- oid_dotted = oid2dotted(rr->request_format_raw);
+ if (rr->request_format != 0) {
+ oid_dotted = oid2dotted(rr->request_format);
} else {
/* Probably an SRU request: assume XML is required */
oid_dotted = wrbuf_alloc();
rr->basename = ODR_basename;
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 (oid_dotstring_to_oid(ptr, ODR_oid_buf))
{
printf("Net::Z3950::SimpleServer: WARNING: OID structure too long, max length is %d\n", MAX_OID);
}
- rr->output_format_raw = ODR_oid_buf;
+ rr->output_format = ODR_oid_buf;
ptr = SvPV(record, length);
- oid = oid_getentbyoid(ODR_oid_buf);
- if (oid->value == VAL_GRS1) /* Treat GRS-1 records separately */
+ /* Treat GRS-1 records separately */
+ if (!oid_oidcmp(ODR_oid_buf, yaz_oid_recsyn_grs_1))
{
rr->record = (char *) read_grs1(ptr, rr->stream);
rr->len = -1;
}
rr->surrogate_flag = SvIV(sur_flag);
- wrbuf_free(oid_dotted, 1);
+ wrbuf_destroy(oid_dotted);
sv_free((SV*) href);
sv_free(basename);
sv_free(record);