requestTransportFilters backwards compatibility
Posted: Mon Jun 23, 2014 5:53 pm
Hi,
I've had to make the following hackish change to RCF-2.0.1.100
in order to establish a custom filter with an RCF-1.3 server:
-------------------------------------------------------------
diff -r 51a401701931 rcf/src/RCF/ClientStub.cpp
--- a/rcf/src/RCF/ClientStub.cpp Mon Jun 23 13:34:27 2014 -0400
+++ b/rcf/src/RCF/ClientStub.cpp Mon Jun 23 18:48:19 2014 +0100
@@ -955,7 +955,7 @@
return;
}
- ClientStub stub(*this);
+ ClientStub& stub = *this;
stub.setTransport( releaseTransport());
stub.setTargetToken( Token());
-------------------------------------------------------------
This copy constructor was storing the remote server version.
Because this copy was stack-constructed, information about
the remote server was thrown away, and so on subsequent
calls to `requestTransportFilters', `getRuntimeVersion' was
still returning 12 instead of the 8 from our RCF-1.3 server.
Thus, `requestTransportFilters_Legacy' was not getting called.
With this change, the first call still fails, but subsequent calls
invoke `requestTransportFilters_Legacy', which succeeds.
As far as we know, this change is working for us, but if there
are side effects that you may be aware of, please let us know.
Thanks!
I've had to make the following hackish change to RCF-2.0.1.100
in order to establish a custom filter with an RCF-1.3 server:
-------------------------------------------------------------
diff -r 51a401701931 rcf/src/RCF/ClientStub.cpp
--- a/rcf/src/RCF/ClientStub.cpp Mon Jun 23 13:34:27 2014 -0400
+++ b/rcf/src/RCF/ClientStub.cpp Mon Jun 23 18:48:19 2014 +0100
@@ -955,7 +955,7 @@
return;
}
- ClientStub stub(*this);
+ ClientStub& stub = *this;
stub.setTransport( releaseTransport());
stub.setTargetToken( Token());
-------------------------------------------------------------
This copy constructor was storing the remote server version.
Because this copy was stack-constructed, information about
the remote server was thrown away, and so on subsequent
calls to `requestTransportFilters', `getRuntimeVersion' was
still returning 12 instead of the 8 from our RCF-1.3 server.
Thus, `requestTransportFilters_Legacy' was not getting called.
With this change, the first call still fails, but subsequent calls
invoke `requestTransportFilters_Legacy', which succeeds.
As far as we know, this change is working for us, but if there
are side effects that you may be aware of, please let us know.
Thanks!