projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Filter multi: relay init sz parameters
[metaproxy-moved-to-github.git]
/
src
/
filter_backend_test.cpp
diff --git
a/src/filter_backend_test.cpp
b/src/filter_backend_test.cpp
index
40f9a05
..
f5067be
100644
(file)
--- a/
src/filter_backend_test.cpp
+++ b/
src/filter_backend_test.cpp
@@
-1,5
+1,5
@@
/* This file is part of Metaproxy.
/* This file is part of Metaproxy.
- Copyright (C) 2005-2008 Index Data
+ Copyright (C) 2005-2011 Index Data
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-18,9
+18,9
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.hpp"
#include "config.hpp"
-#include "filter.hpp"
-#include "package.hpp"
-#include "util.hpp"
+#include <metaproxy/filter.hpp>
+#include <metaproxy/package.hpp>
+#include <metaproxy/util.hpp>
#include "filter_backend_test.hpp"
#include <stdexcept>
#include "filter_backend_test.hpp"
#include <stdexcept>
@@
-44,6
+44,8
@@
namespace metaproxy_1 {
namespace filter {
class Session_info {
int dummy;
namespace filter {
class Session_info {
int dummy;
+ public:
+ Session_info() { dummy = 0; };
};
class BackendTest::Rep {
friend class BackendTest;
};
class BackendTest::Rep {
friend class BackendTest;
@@
-232,7
+234,7
@@
void yf::BackendTest::process(Package &package) const
Z_InitRequest *req = apdu_req->u.initRequest;
Z_InitResponse *resp = apdu_res->u.initResponse;
Z_InitRequest *req = apdu_req->u.initRequest;
Z_InitResponse *resp = apdu_res->u.initResponse;
- resp->implementationName = "backend_test";
+ resp->implementationName = odr_strdup(odr, "backend_test");
if (ODR_MASK_GET(req->options, Z_Options_namedResultSets))
m_p->m_support_named_result_sets = true;
if (ODR_MASK_GET(req->options, Z_Options_namedResultSets))
m_p->m_support_named_result_sets = true;
@@
-256,6
+258,9
@@
void yf::BackendTest::process(Package &package) const
else
break;
else
break;
+ *resp->preferredMessageSize = *req->preferredMessageSize;
+ *resp->maximumRecordSize = *req->maximumRecordSize;
+
Session_info info;
m_p->m_sessions.create(info, package.session());
}
Session_info info;
m_p->m_sessions.create(info, package.session());
}
@@
-366,6
+371,12
@@
void yf::BackendTest::process(Package &package) const
*resp->nextResultSetPosition = next_position;
}
}
*resp->nextResultSetPosition = next_position;
}
}
+ else if (apdu_req->which == Z_APDU_close)
+ {
+ apdu_res = odr.create_close(apdu_req,
+ Z_Close_finished, 0);
+ package.session().close();
+ }
else
{
apdu_res = odr.create_close(apdu_req,
else
{
apdu_res = odr.create_close(apdu_req,