Rename SOLR HTTP response function
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 12 Aug 2010 13:22:16 +0000 (15:22 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 12 Aug 2010 13:22:16 +0000 (15:22 +0200)
From yaz_solr_decode to yaz_solr_decode_response; it only deals
with HTTP response decoding.

client/client.c
include/yaz/srw.h
src/solr.c
src/zoom-sru.c

index d9a98f8..d4bd50e 100644 (file)
@@ -4369,7 +4369,7 @@ static void http_response(Z_HTTP_Response *hres)
         {
             Z_SRW_PDU *sr = 0;
             ODR o = odr_createmem(ODR_DECODE);
-            ret = yaz_solr_decode(o, hres, &sr);
+            ret = yaz_solr_decode_response(o, hres, &sr);
 
             if (ret == 0 && sr->which == Z_SRW_searchRetrieve_response)
                 handle_srw_response(sr->u.response);
index f630a93..981097a 100644 (file)
@@ -266,12 +266,21 @@ YAZ_EXPORT void yaz_decode_uri_component(char *dst, const char *uri,
 
 YAZ_EXPORT int yaz_srw_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
                               Z_SOAP **soap_package, ODR decode, char **charset);
+
 YAZ_EXPORT int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
                               Z_SOAP **soap_package, ODR decode, 
                               char **charset,
                               Z_SRW_diagnostic **, int *num_diagnostic);
 
-YAZ_EXPORT int yaz_solr_decode(ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup);
+/** \brief decode SOLR response (HTTP)
+    \param o ODR for result
+    \param hres HTTP response to be decoded
+    \param pdup SRW response pointer (set if successful)
+    \retval -1 fail
+    \retval 0 OK
+*/
+YAZ_EXPORT int yaz_solr_decode_response(ODR o, Z_HTTP_Response *hres,
+                                        Z_SRW_PDU **pdup);
 
 
 YAZ_EXPORT void yaz_add_srw_diagnostic(ODR o, Z_SRW_diagnostic **d,
index 1fa0d38..1783440 100644 (file)
@@ -20,7 +20,7 @@
 #include <libxml/tree.h>
 #endif
 
-int yaz_solr_decode(ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup)
+int yaz_solr_decode_response(ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup)
 {
 #if YAZ_HAVE_XML2
     const char *content_buf = hres->content_buf;
index 144f025..0ff4e3c 100644 (file)
@@ -388,7 +388,7 @@ int ZOOM_handle_sru(ZOOM_connection c, Z_HTTP_Response *hres,
     else if (c->sru_mode == zoom_sru_solr)
     {
         Z_SRW_PDU *sr;
-        ret = yaz_solr_decode(c->odr_in, hres, &sr);
+        ret = yaz_solr_decode_response(c->odr_in, hres, &sr);
         if (ret == 0)
             if (sr->which == Z_SRW_searchRetrieve_response)
                 *cret = handle_srw_response(c, sr->u.response);