summaryrefslogtreecommitdiff
path: root/ruby/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-11-25 13:13:22 +0100
committerBenoit Foucher <benoit@zeroc.com>2016-11-25 13:13:22 +0100
commitdcdc32af1fced49d80a8ccd93230e15d91ab45d8 (patch)
treeeb69e2555fbd54496fce8a33f4dd610e1473ff51 /ruby/src
parentC# IceSSL/configuration log expired certificate exceptions. (diff)
downloadice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.bz2
ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.xz
ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.zip
Refactored test scripts
Diffstat (limited to 'ruby/src')
-rw-r--r--ruby/src/IceRuby/Communicator.cpp11
-rw-r--r--ruby/src/IceRuby/Init.cpp17
-rw-r--r--ruby/src/IceRuby/Makefile.mk2
3 files changed, 17 insertions, 13 deletions
diff --git a/ruby/src/IceRuby/Communicator.cpp b/ruby/src/IceRuby/Communicator.cpp
index 73fd483f8be..232092dd9bd 100644
--- a/ruby/src/IceRuby/Communicator.cpp
+++ b/ruby/src/IceRuby/Communicator.cpp
@@ -173,6 +173,17 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self)
communicator = Ice::initialize(data);
}
}
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ for(i = 0; i < ac + 1; ++i)
+ {
+ free(av[i]);
+ }
+ delete[] av;
+
+ throw;
+ }
catch(...)
{
for(i = 0; i < ac + 1; ++i)
diff --git a/ruby/src/IceRuby/Init.cpp b/ruby/src/IceRuby/Init.cpp
index 5520de7d9fe..a0c2663f4ed 100644
--- a/ruby/src/IceRuby/Init.cpp
+++ b/ruby/src/IceRuby/Init.cpp
@@ -19,6 +19,8 @@
#include <Endpoint.h>
#include <ValueFactoryManager.h>
+#include <Ice/RegisterPlugins.h>
+
using namespace std;
using namespace IceRuby;
@@ -27,21 +29,12 @@ static VALUE iceModule;
extern "C"
{
-#ifdef ICE_STATIC_LIBS
-Ice::Plugin* createIceSSL(const Ice::CommunicatorPtr&, const std::string&, const Ice::StringSeq&);
-Ice::Plugin* createIceDiscovery(const Ice::CommunicatorPtr&, const string&, const Ice::StringSeq&);
-Ice::Plugin* createIceLocatorDiscovery(const Ice::CommunicatorPtr&, const string&, const Ice::StringSeq&);
-#endif
-
void
ICE_DECLSPEC_EXPORT Init_IceRuby()
{
-#ifdef ICE_STATIC_LIBS
- // Register the plugins manually if we're building with static libraries.
- Ice::registerPluginFactory("IceSSL", createIceSSL, false);
- Ice::registerPluginFactory("IceDiscovery", createIceDiscovery, false);
- Ice::registerPluginFactory("IceLocatorDiscovery", createIceLocatorDiscovery, false);
-#endif
+ Ice::registerIceSSL(false);
+ Ice::registerIceDiscovery(false);
+ Ice::registerIceLocatorDiscovery(false);
iceModule = rb_define_module("Ice");
initCommunicator(iceModule);
diff --git a/ruby/src/IceRuby/Makefile.mk b/ruby/src/IceRuby/Makefile.mk
index 991308fc482..b4468e12b9c 100644
--- a/ruby/src/IceRuby/Makefile.mk
+++ b/ruby/src/IceRuby/Makefile.mk
@@ -16,7 +16,7 @@ IceRuby_installdir := $(install_rubylibdir)
IceRuby_cppflags := -I$(project) -I$(top_srcdir)/cpp/include -I$(top_srcdir)/cpp/include/generated \
-I$(top_srcdir)/cpp/src $(ruby_cppflags)
IceRuby_ldflags := $(ruby_ldflags)
-IceRuby_dependencies := IceSSL Ice
+IceRuby_dependencies := IceDiscovery IceLocatorDiscovery IceSSL Ice
IceRuby_libs := mcpp
IceRuby_extra_sources := $(filter-out %Util.cpp %Python.cpp,\
$(wildcard $(top_srcdir)/cpp/src/Slice/*.cpp)) \