summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-07-02 16:27:37 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-07-02 16:27:37 +0100
commit86f71e2496dfd3c3eceabc5bc19a625419be549e (patch)
tree6c11c54287e1078787237dbbdb208806f704d9d3
parentLoad a default config file it one is present (diff)
downloadicespider-86f71e2496dfd3c3eceabc5bc19a625419be549e.tar.bz2
icespider-86f71e2496dfd3c3eceabc5bc19a625419be549e.tar.xz
icespider-86f71e2496dfd3c3eceabc5bc19a625419be549e.zip
Demangle interface names for property lookup
-rw-r--r--icespider/core/core.cpp5
-rw-r--r--icespider/unittests/testApp.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/icespider/core/core.cpp b/icespider/core/core.cpp
index 3ada79c..b21a805 100644
--- a/icespider/core/core.cpp
+++ b/icespider/core/core.cpp
@@ -71,7 +71,10 @@ namespace IceSpider {
Ice::ObjectPrx
Core::getProxy(const char * type) const
{
- return communicator->propertyToProxy(type);
+ char * buf = __cxxabiv1::__cxa_demangle(type, NULL, NULL, NULL);
+ auto i = communicator->propertyToProxy(buf);
+ free(buf);
+ return i;
}
}
diff --git a/icespider/unittests/testApp.cpp b/icespider/unittests/testApp.cpp
index 71ae7d4..80dd6c1 100644
--- a/icespider/unittests/testApp.cpp
+++ b/icespider/unittests/testApp.cpp
@@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE( testCallMethods )
auto obj = adp->addWithUUID(new TestSerice());
adp->activate();
fprintf(stderr, "%s\n", obj->ice_id().c_str());
- communicator->getProperties()->setProperty("N13TestIceSpider7TestApiE", communicator->proxyToString(obj));
+ communicator->getProperties()->setProperty("TestIceSpider::TestApi", communicator->proxyToString(obj));
TestRequest requestGetIndex(this, HttpMethod::GET, "/");
process(&requestGetIndex);