Use move_way_gdu method from GDU clas. Minor update due to size_t != int
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 13 Oct 2005 09:58:52 +0000 (09:58 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 13 Oct 2005 09:58:52 +0000 (09:58 +0000)
include/yazproxy/proxy.h
src/p2_frontend.h
src/t-server.cpp
src/yaz-proxy.cpp

index 4c41242..372d9c0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: proxy.h,v 1.24 2005-09-26 09:25:05 adam Exp $
+/* $Id: proxy.h,v 1.25 2005-10-13 09:58:52 adam Exp $
    Copyright (c) 1998-2005, Index Data.
 
 This file is part of the yaz-proxy.
@@ -29,6 +29,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <yaz++/cql2rpn.h>
 #include <yaz/cql.h>
 #include <yaz++/gdu.h>
+#include <yaz++/gduqueue.h>
 #include <yazproxy/bw.h>
 
 class Yaz_Proxy;
index fe403e6..f7d745e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: p2_frontend.h,v 1.1 2005-10-05 12:07:14 adam Exp $
+/* $Id: p2_frontend.h,v 1.2 2005-10-13 09:58:52 adam Exp $
    Copyright (c) 1998-2005, Index Data.
 
 This file is part of the yaz-proxy.
@@ -30,6 +30,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <yaz++/z-assoc.h>
 #include <yaz++/pdu-assoc.h>
 #include <yaz++/gdu.h>
+#include <yaz++/gduqueue.h>
 #include <yaz++/z-query.h>
 
 class P2_Frontend;
index b7133a5..960e4cb 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 2005, Index Data.
  * See the file LICENSE for details.
  * 
- * $Id: t-server.cpp,v 1.6 2005-10-05 12:07:15 adam Exp $
+ * $Id: t-server.cpp,v 1.7 2005-10-13 09:58:52 adam Exp $
  */
 
 #include <stdlib.h>
@@ -14,6 +14,7 @@
 #include <yaz++/z-assoc.h>
 #include <yaz++/pdu-assoc.h>
 #include <yaz++/gdu.h>
+#include <yaz++/gduqueue.h>
 #include <yaz++/socket-manager.h>
 
 using namespace yazpp_1;
index f096210..1bea004 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: yaz-proxy.cpp,v 1.37 2005-09-26 09:25:06 adam Exp $
+/* $Id: yaz-proxy.cpp,v 1.38 2005-10-13 09:58:52 adam Exp $
    Copyright (c) 1998-2005, Index Data.
 
 This file is part of the yaz-proxy.
@@ -1830,8 +1830,8 @@ void Yaz_Proxy::recv_GDU_more(bool normal)
 
 void Yaz_Proxy::recv_GDU_normal(GDU *gdu)
 {
-    Z_GDU *apdu = gdu->get();
-    gdu->extract_odr_to(odr_decode());
+    Z_GDU *apdu = 0;
+    gdu->move_away_gdu(odr_decode(), &apdu);
     delete gdu;
 
     if (apdu->which == Z_GDU_Z3950)
@@ -2606,7 +2606,8 @@ void Yaz_Proxy::handle_incoming_HTTP(Z_HTTP_Request *hreq)
                     const char *pqf_msg;
                     size_t off;
                     int code = yaz_pqf_error (pqf_parser, &pqf_msg, &off);
-                    yaz_log(YLOG_LOG, "%*s^\n", off+4, "");
+                    int ioff = off;
+                    yaz_log(YLOG_LOG, "%*s^\n", ioff+4, "");
                     yaz_log(YLOG_LOG, "Bad PQF: %s (code %d)\n", pqf_msg, code);
                     
                     send_to_srw_client_error(10, 0);