diff options
author | Jose <jose@zeroc.com> | 2011-05-12 19:15:59 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-05-12 19:15:59 +0200 |
commit | 41a33a0a600770ab9804b476f85338297d24c01d (patch) | |
tree | 3efb459b16aca3401092065fc96f0935bb90d9c4 /cpp/src/IceStorm/Util.cpp | |
parent | 5035 - iceboxnet ServiceManagerI throw wrong exception (diff) | |
download | ice-41a33a0a600770ab9804b476f85338297d24c01d.tar.bz2 ice-41a33a0a600770ab9804b476f85338297d24c01d.tar.xz ice-41a33a0a600770ab9804b476f85338297d24c01d.zip |
4846 - Include subscriber endpoints in IceStorm trace
Diffstat (limited to 'cpp/src/IceStorm/Util.cpp')
-rw-r--r-- | cpp/src/IceStorm/Util.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/cpp/src/IceStorm/Util.cpp b/cpp/src/IceStorm/Util.cpp new file mode 100644 index 00000000000..3ba86f439d3 --- /dev/null +++ b/cpp/src/IceStorm/Util.cpp @@ -0,0 +1,35 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <IceStorm/Util.h> + +using namespace std; + +string +IceStormInternal::describeEndpoints(const Ice::ObjectPrx& proxy) +{ + ostringstream os; + if(proxy) + { + Ice::EndpointSeq endpoints = proxy->ice_getEndpoints(); + for(Ice::EndpointSeq::const_iterator i = endpoints.begin(); i != endpoints.end(); ++i) + { + if(i != endpoints.begin()) + { + os << ", "; + } + os << "\"" << (*i)->toString() << "\""; + } + } + else + { + os << "subscriber proxy is null"; + } + return os.str(); +} |