Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 2 Oct 2008 17:55:08 +0000 (19:55 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 2 Oct 2008 17:55:08 +0000 (19:55 +0200)
NEWS
configure.ac
debian/changelog
debian/rules
include/yaz/yaz-version.h
src/zoom-c.c
win/yaz.nsi

diff --git a/NEWS b/NEWS
index 9aabc24..bfc111e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,24 @@
+--- 3.0.36 2008/09/26
+
+Various ODR chapter fixes.
+
+Windows version uses libxml2 2.6.32+, libxslt 1.1.23+ and ICU 4.0.
+
+Added missing source for Windows compilation, mutex.c.
+
+Fixed compilation of YAZ for Visual Studio 2008. Bug #2256.
+
+For SRU connections in ZOOM all records up to "count" are now fetched.
+
 Fixed crash in generic frontend server (and yaz-ztest) which occurred
 in Windows due to bad error handling for Libxml2.
 
 Added facility for sending arbitrary records (ASN.1 any) using
 ZOOM C's Extended service update. Patch by Sam Reynolds.
 
+New options for ZOOM C's connection, logapdu which makes ZOOM log
+APDUs.
+
 --- 3.0.34 2008/06/18
 
 YAZ uses GNU TLS without the OpenSSL compatibility wrapper.
index 8762323..03b9f34 100644 (file)
@@ -1,7 +1,7 @@
 dnl This file is part of the YAZ toolkit.
 dnl Copyright (C) 1995-2008 Index Data
 AC_PREREQ([2.60])
-AC_INIT([yaz],[3.0.34],[yaz-help@indexdata.dk])
+AC_INIT([yaz],[3.0.36],[yaz-help@indexdata.dk])
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_AUX_DIR([config])
 AM_INIT_AUTOMAKE([1.9])
index 9797010..f1834ce 100644 (file)
@@ -1,3 +1,9 @@
+yaz (3.0.36-1) unstable; urgency=low
+
+  * Upstream. 
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Fri, 26 Sep 2008 12:20:31 +0200
+
 yaz (3.0.34-1) unstable; urgency=low
 
   * Upstream.
index 03c0d9e..76a3849 100755 (executable)
@@ -98,7 +98,7 @@ binary-arch: build install
        dh_fixperms
 #      dh_perl
 #      dh_python
-       dh_makeshlibs -V 'libyaz3 (>= 3.0.30)'
+       dh_makeshlibs -V 'libyaz3 (>= 3.0.36)'
        dh_installdeb
        dh_shlibdeps  -l debian/libyaz3/usr/lib
        dh_gencontrol
index fdacf37..e1d9838 100644 (file)
 
 #include <yaz/yconfig.h>
 
-#define YAZ_VERSION "3.0.34"
-#define YAZ_VERSIONL 0x030022
+#define YAZ_VERSION "3.0.36"
+#define YAZ_VERSIONL 0x030024
 
-#define YAZ_FILEVERSION 3,0,34,1
+#define YAZ_FILEVERSION 3,0,36,1
 
 #define YAZ_DATE 1
 
index bea723f..89456b2 100644 (file)
@@ -1488,7 +1488,7 @@ static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c)
 
         start = &c->tasks->u.retrieve.start;
         count = &c->tasks->u.retrieve.count;
-        
+
         if (*start >= resultset->size)
             return zoom_complete;
         if (*start + *count > resultset->size)
@@ -1539,7 +1539,8 @@ static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c)
     }
     sr->u.request->startRecord = odr_intdup(c->odr_out, *start + 1);
     sr->u.request->maximumRecords = odr_intdup(
-        c->odr_out, resultset->step>0 ? resultset->step : *count);
+        c->odr_out, (resultset->step > 0 && resultset->step < *count) ? 
+        resultset->step : *count);
     sr->u.request->recordSchema = resultset->schema;
     
     option_val = ZOOM_resultset_option_get(resultset, "recordPacking");
@@ -3942,35 +3943,37 @@ static void recv_apdu(ZOOM_connection c, Z_APDU *apdu)
 }
 
 #if YAZ_HAVE_XML2
-static void handle_srw_response(ZOOM_connection c,
-                                Z_SRW_searchRetrieveResponse *res)
+static zoom_ret handle_srw_response(ZOOM_connection c,
+                                    Z_SRW_searchRetrieveResponse *res)
 {
     ZOOM_resultset resultset = 0;
     int i;
     NMEM nmem;
     ZOOM_Event event;
-    int *start;
+    int *start, *count;
     const char *syntax, *elementSetName;
 
     if (!c->tasks)
-        return;
+        return zoom_complete;
 
     switch(c->tasks->which)
     {
     case ZOOM_TASK_SEARCH:
         resultset = c->tasks->u.search.resultset;
         start = &c->tasks->u.search.start;
+        count = &c->tasks->u.search.count;
         syntax = c->tasks->u.search.syntax;
         elementSetName = c->tasks->u.search.elementSetName;        
         break;
     case ZOOM_TASK_RETRIEVE:
         resultset = c->tasks->u.retrieve.resultset;
         start = &c->tasks->u.retrieve.start;
+        count = &c->tasks->u.retrieve.count;
         syntax = c->tasks->u.retrieve.syntax;
         elementSetName = c->tasks->u.retrieve.elementSetName;
         break;
     default:
-        return;
+        return zoom_complete;
     }
     event = ZOOM_Event_create(ZOOM_EVENT_RECV_SEARCH);
     ZOOM_connection_put_event(c, event);
@@ -4032,11 +4035,22 @@ static void handle_srw_response(ZOOM_connection c,
         record_cache_add(resultset, npr, pos, syntax, elementSetName,
                          sru_rec->recordSchema, diag);
     }
+    *count -= i;
+    *start += i;
+    if (*count + *start > resultset->size)
+        *count = resultset->size - *start;
+    if (*count < 0)
+        *count = 0;
+
     if (res->num_diagnostics > 0)
         set_SRU_error(c, &res->diagnostics[0]);
     nmem = odr_extract_mem(c->odr_in);
     nmem_transfer(odr_getmem(resultset->odr), nmem);
     nmem_destroy(nmem);
+    
+    if (*count > 0)
+        return ZOOM_connection_srw_send_search(c);
+    return zoom_complete;
 }
 #endif
 
@@ -4066,6 +4080,7 @@ static void handle_srw_scan_response(ZOOM_connection c,
 #if YAZ_HAVE_XML2
 static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
 {
+    zoom_ret cret = zoom_complete;
     int ret = -1;
     const char *addinfo = 0;
     const char *connection_head = z_HTTP_header_lookup(hres->headers,
@@ -4093,7 +4108,7 @@ static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
 
             ZOOM_options_set(c->options, "sru_version", sr->srw_version);
             if (sr->which == Z_SRW_searchRetrieve_response)
-                handle_srw_response(c, sr->u.response);
+                cret = handle_srw_response(c, sr->u.response);
             else if (sr->which == Z_SRW_scan_response)
                 handle_srw_scan_response(c, sr->u.scan_response);
             else
@@ -4117,7 +4132,8 @@ static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
             set_ZOOM_error(c, ZOOM_ERROR_DECODE, addinfo);
         do_close(c);
     }
-    ZOOM_connection_remove_task(c);
+    if (cret == zoom_complete)
+        ZOOM_connection_remove_task(c);
     if (!strcmp(hres->version, "1.0"))
     {
         /* HTTP 1.0: only if Keep-Alive we stay alive.. */
index f58aea7..236a995 100644 (file)
@@ -1,7 +1,7 @@
 ; This file is part of the YAZ toolkit.
 ; Copyright (C) 1995-2008 Index Data
 
-!define VERSION "3.0.34"
+!define VERSION "3.0.36"
 
 ; Microsoft runtime CRT 
 ; Uncomment exactly ONE section of the three below
@@ -106,9 +106,7 @@ Noservice:
        File ..\bin\libxml2.dll
        File ..\bin\libxslt.dll
        File ..\bin\yaz3.dll
-       File ..\bin\icudt38.dll
-       File ..\bin\icuin38.dll
-       File ..\bin\icuuc38.dll
+       File ..\bin\icu*.dll
        File ..\bin\yaz_icu3.dll
        File ..\bin\*.exe
        SetOutPath $SMPROGRAMS\YAZ