yaz-ztest: use built-in array for MARC always
[yaz-moved-to-github.git] / src / zoom-c.c
index 14922ac..684d1b6 100644 (file)
@@ -2196,6 +2196,11 @@ ZOOM_API(const char *)
         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_TMARCXML, charset,
+                                 format);
+    }
     else if (!strcmp(type, "raw"))
     {
         return get_record_format(rec, len, npr, YAZ_MARC_ISO2709, charset,
@@ -2381,7 +2386,10 @@ static void handle_records(ZOOM_connection c, Z_Records *sr,
             {
                 /* 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);
             }
@@ -2390,7 +2398,10 @@ static void handle_records(ZOOM_connection c, Z_Records *sr,
         {
             /* 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);
         }
@@ -4670,6 +4681,11 @@ ZOOM_API(int) ZOOM_connection_get_timeout(ZOOM_connection c)
     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