-/* $Id: filter_record_transform.cpp,v 1.7 2006-12-12 11:01:40 marc Exp $
- Copyright (c) 2005-2006, Index Data.
+/* $Id: filter_record_transform.cpp,v 1.11 2007-05-09 07:14:28 adam Exp $
+ Copyright (c) 2005-2007, Index Data.
See the LICENSE file for details
*/
}
const char *match_schema = 0;
- int *match_syntax = 0;
+ Odr_oid *match_syntax = 0;
const char *backend_schema = 0;
Odr_oid *backend_syntax = 0;
else if (ret_code == 2)
{
char oidbuf[OID_STR_MAX];
- oid_to_dotstring(input_syntax, oidbuf);
+ oid_oid_to_dotstring(input_syntax, oidbuf);
details = odr_strdup(odr_en, oidbuf);
apdu = odr_en.create_presentResponse(
return;
}
-
-
// now re-coding the z3950 backend present request
- // z3950'fy record syntax
- if (backend_syntax) // TODO: this seems not to work - why ??
- pr_req->preferredRecordSyntax = backend_syntax;
+ if (backend_syntax)
+ pr_req->preferredRecordSyntax = odr_oiddup(odr_en, backend_syntax);
else
- pr_req->preferredRecordSyntax
- = yaz_oidval_to_z3950oid(odr_en, CLASS_RECSYN, VAL_NONE);
+ pr_req->preferredRecordSyntax = 0;
// z3950'fy record schema
output_record);
if (ret_trans == 0)
{
- struct oident *ident = oid_getentbyoid(match_syntax);
npr->u.databaseRecord =
- z_ext_record(odr_en, ident->value,
+ z_ext_record_oid(odr_en, match_syntax,
wrbuf_buf(output_record),
wrbuf_len(output_record));
}
YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS,
yaz_record_conv_get_error(rc));
}
- wrbuf_free(output_record, 1);
+ wrbuf_destroy(output_record);
}
}
}