projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update TurboMARC definition and document it
[yaz-moved-to-github.git]
/
src
/
zoom-c.c
diff --git
a/src/zoom-c.c
b/src/zoom-c.c
index
42f30a0
..
c579957
100644
(file)
--- a/
src/zoom-c.c
+++ b/
src/zoom-c.c
@@
-349,8
+349,6
@@
void ZOOM_connection_remove_task(ZOOM_connection c)
}
}
}
}
-static int ZOOM_connection_exec_task(ZOOM_connection c);
-
void ZOOM_connection_remove_tasks(ZOOM_connection c)
{
while (c->tasks)
void ZOOM_connection_remove_tasks(ZOOM_connection c)
{
while (c->tasks)
@@
-2081,8
+2079,9
@@
static const char *get_record_format(ZOOM_record rec, int *len,
if (*format == '1' && len)
{
/* try to XML format res */
if (*format == '1' && len)
{
/* try to XML format res */
- xmlKeepBlanksDefault(0);
- xmlDocPtr doc = xmlParseMemory(res, *len);
+ xmlDocPtr doc;
+ xmlKeepBlanksDefault(0); /* get get xmlDocFormatMemory to work! */
+ doc = xmlParseMemory(res, *len);
if (doc)
{
if (rec->xml_mem)
if (doc)
{
if (rec->xml_mem)
@@
-2195,6
+2194,11
@@
ZOOM_API(const char *)
return get_record_format(rec, len, npr, YAZ_MARC_MARCXML, charset,
format);
}
return get_record_format(rec, len, npr, YAZ_MARC_MARCXML, charset,
format);
}
+ else if (!strcmp(type, "txml"))
+ {
+ return get_record_format(rec, len, npr, YAZ_MARC_TURBOMARC, charset,
+ format);
+ }
else if (!strcmp(type, "raw"))
{
return get_record_format(rec, len, npr, YAZ_MARC_ISO2709, charset,
else if (!strcmp(type, "raw"))
{
return get_record_format(rec, len, npr, YAZ_MARC_ISO2709, charset,
@@
-2380,7
+2384,10
@@
static void handle_records(ZOOM_connection c, Z_Records *sr,
{
/* present response and we didn't get any records! */
Z_NamePlusRecord *myrec =
{
/* present response and we didn't get any records! */
Z_NamePlusRecord *myrec =
- zget_surrogateDiagRec(resultset->odr, 0, 14, 0);
+ zget_surrogateDiagRec(
+ resultset->odr, 0,
+ YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS,
+ "ZOOM C generated. Present phase and no records");
record_cache_add(resultset, myrec, *start,
syntax, elementSetName, 0, 0);
}
record_cache_add(resultset, myrec, *start,
syntax, elementSetName, 0, 0);
}
@@
-2389,7
+2396,10
@@
static void handle_records(ZOOM_connection c, Z_Records *sr,
{
/* present response and we didn't get any records! */
Z_NamePlusRecord *myrec =
{
/* present response and we didn't get any records! */
Z_NamePlusRecord *myrec =
- zget_surrogateDiagRec(resultset->odr, 0, 14, 0);
+ zget_surrogateDiagRec(
+ resultset->odr, 0,
+ YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS,
+ "ZOOM C generated: Present response and no records");
record_cache_add(resultset, myrec, *start, syntax, elementSetName,
0, 0);
}
record_cache_add(resultset, myrec, *start, syntax, elementSetName,
0, 0);
}
@@
-3600,7
+3610,8
@@
ZOOM_API(void)
ZOOM_options_setl(p->options, key, val, len);
}
ZOOM_options_setl(p->options, key, val, len);
}
-static int ZOOM_connection_exec_task(ZOOM_connection c)
+ZOOM_API(int)
+ ZOOM_connection_exec_task(ZOOM_connection c)
{
ZOOM_task task = c->tasks;
zoom_ret ret = zoom_complete;
{
ZOOM_task task = c->tasks;
zoom_ret ret = zoom_complete;
@@
-4669,6
+4680,11
@@
ZOOM_API(int) ZOOM_connection_get_timeout(ZOOM_connection c)
return ZOOM_options_get_int(c->options, "timeout", 30);
}
return ZOOM_options_get_int(c->options, "timeout", 30);
}
+ZOOM_API(void) ZOOM_connection_close(ZOOM_connection c)
+{
+ do_close(c);
+}
+
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4