Changed arg soap of decode_sru_request.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 20 Mar 2007 07:20:16 +0000 (07:20 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 20 Mar 2007 07:20:16 +0000 (07:20 +0000)
src/filter_sru_to_z3950.cpp
src/filter_zeerex_explain.cpp
src/sru_util.cpp
src/sru_util.hpp

index 9cb97bb..8cccea3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: filter_sru_to_z3950.cpp,v 1.31 2007-03-20 07:05:10 adam Exp $
+/* $Id: filter_sru_to_z3950.cpp,v 1.32 2007-03-20 07:20:16 adam Exp $
    Copyright (c) 2005-2007, Index Data.
 
    See the LICENSE file for details
@@ -176,7 +176,7 @@ void yf::SRUtoZ3950::Impl::process(mp::Package &package)
 
     // filter acts as sink for non-valid SRU requests
     if (! (sru_pdu_req = mp_util::decode_sru_request(package, odr_de, odr_en, 
-                                            sru_pdu_res, soap,
+                                            sru_pdu_res, &soap,
                                             charset, stylesheet)))
     {
         if (soap)
@@ -205,16 +205,11 @@ void yf::SRUtoZ3950::Impl::process(mp::Package &package)
         //                           sruinfo, er_req);
         mp_util::build_sru_explain(package, odr_en, sru_pdu_res, 
                                    sruinfo, explainnode, er_req);
-        mp_util::build_sru_response(package, odr_en, soap, 
-                                    sru_pdu_res, charset, stylesheet);
-        return;
     }
-
-    // searchRetrieve
     else if (sru_pdu_req 
         && sru_pdu_req->which == Z_SRW_searchRetrieve_request
         && sru_pdu_req->u.request)
-    {
+    {   // searchRetrieve
         Z_SRW_searchRetrieveRequest *sr_req = sru_pdu_req->u.request;   
         
         sru_pdu_res = yaz_srw_get(odr_en, Z_SRW_searchRetrieve_response);
@@ -277,7 +272,6 @@ void yf::SRUtoZ3950::Impl::process(mp::Package &package)
     // build and send SRU response
     mp_util::build_sru_response(package, odr_en, soap, 
                                 sru_pdu_res, charset, stylesheet);
-    return;
 }
 
 
@@ -367,12 +361,11 @@ yf::SRUtoZ3950::Impl::z3950_close_request(mp::Package &package) const
     return false;
 }
 
-bool 
-yf::SRUtoZ3950::Impl::z3950_search_request(mp::Package &package,  
-                                          mp::odr &odr_en,
-                                          Z_SRW_PDU *sru_pdu_res,
-                                          Z_SRW_searchRetrieveRequest 
-                                          const *sr_req) const
+bool yf::SRUtoZ3950::Impl::z3950_search_request(mp::Package &package,  
+                                                mp::odr &odr_en,
+                                                Z_SRW_PDU *sru_pdu_res,
+                                                Z_SRW_searchRetrieveRequest 
+                                                const *sr_req) const
 {
 
     assert(sru_pdu_res->u.response);
index cd777c0..17a4e28 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: filter_zeerex_explain.cpp,v 1.4 2007-01-25 14:05:54 adam Exp $
+/* $Id: filter_zeerex_explain.cpp,v 1.5 2007-03-20 07:20:16 adam Exp $
    Copyright (c) 2005-2007, Index Data.
 
    See the LICENSE file for details
@@ -140,7 +140,7 @@ void yf::ZeeRexExplain::Impl::process(mp::Package &package)
     char *charset = 0;
     char *stylesheet = 0;
     if (! (sru_pdu_req = mp_util::decode_sru_request(package, odr_de, odr_en, 
-                                            sru_pdu_res, soap,
+                                            sru_pdu_res, &soap,
                                             charset, stylesheet)))
     {
         mp_util::build_sru_explain(package, odr_en, sru_pdu_res, 
@@ -152,13 +152,15 @@ void yf::ZeeRexExplain::Impl::process(mp::Package &package)
     }
     
 
-    if (sru_pdu_req->which != Z_SRW_explain_request){
+    if (sru_pdu_req->which != Z_SRW_explain_request)
+    {
     // Let pass all other SRU actions
         package.move();
         return;
     }
     // except valid SRU explain request, construct ZeeRex Explain response
-    else {
+    else 
+    {
         Z_SRW_explainRequest *er_req = sru_pdu_req->u.explain_request;
         //mp_util::build_simple_explain(package, odr_en, sru_pdu_res, 
         //                           sruinfo, er_req);
index 575acc6..ef6a13e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sru_util.cpp,v 1.8 2007-02-08 09:22:32 marc Exp $
+/* $Id: sru_util.cpp,v 1.9 2007-03-20 07:20:16 adam Exp $
    Copyright (c) 2005-2007, Index Data.
 
    See the LICENSE file for details
@@ -221,7 +221,7 @@ bool mp_util::build_sru_response(mp::Package &package,
                                                      mp::odr &odr_de,
                                                      mp::odr &odr_en,
                                                      Z_SRW_PDU *sru_pdu_res,
-                                                     Z_SOAP *&soap,
+                                                     Z_SOAP **soap,
                                                      char *charset,
                                                      char *stylesheet) 
 {
@@ -241,7 +241,7 @@ bool mp_util::build_sru_response(mp::Package &package,
 
     // checking if we got a SRU GET/POST/SOAP HTTP package
     // closing connection if we did not ...
-    if (0 == yaz_sru_decode(http_req, &sru_pdu_req, &soap, 
+    if (0 == yaz_sru_decode(http_req, &sru_pdu_req, soap, 
                             odr_de, &charset, 
                             &(sru_pdu_res->u.response->diagnostics), 
                             &(sru_pdu_res->u.response->num_diagnostics)))
@@ -254,7 +254,7 @@ bool mp_util::build_sru_response(mp::Package &package,
         }
         return sru_pdu_req;
     }
-    else if (0 == yaz_srw_decode(http_req, &sru_pdu_req, &soap, 
+    else if (0 == yaz_srw_decode(http_req, &sru_pdu_req, soap, 
                                  odr_de, &charset))
         return sru_pdu_req;
     else 
index 4863267..95d36fb 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: sru_util.hpp,v 1.7 2007-01-25 14:05:54 adam Exp $
--   Copyright (c) 2005-2007, Index Data.
+/* $Id: sru_util.hpp,v 1.8 2007-03-20 07:20:16 adam Exp $
+   Copyright (c) 2005-2007, Index Data.
 
    See the LICENSE file for details
  */
@@ -65,7 +65,7 @@ namespace metaproxy_1 {
                                        metaproxy_1::odr &odr_de,
                                        metaproxy_1::odr &odr_en,
                                        Z_SRW_PDU *sru_pdu_res,
-                                       Z_SOAP *&soap,
+                                       Z_SOAP **soap,
                                        char *charset,
                                        char *stylesheet);