summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ObserverHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ObserverHelper.cpp')
-rw-r--r--cpp/src/Ice/ObserverHelper.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/cpp/src/Ice/ObserverHelper.cpp b/cpp/src/Ice/ObserverHelper.cpp
index f4e128ff652..c4406dd088b 100644
--- a/cpp/src/Ice/ObserverHelper.cpp
+++ b/cpp/src/Ice/ObserverHelper.cpp
@@ -19,16 +19,23 @@ using namespace IceInternal;
InvocationObserver::InvocationObserver(IceProxy::Ice::Object* proxy, const string& operation, const Context* context)
{
- if(proxy->__reference()->getInstance()->initializationData().observer)
+ const Ice::Instrumentation::CommunicatorObserverPtr& obsv =
+ proxy->__reference()->getInstance()->initializationData().observer;
+ if(obsv)
{
- attach(proxy, operation, context);
+ if(context)
+ {
+ ObserverHelperT<Ice::Instrumentation::InvocationObserver>::attach(
+ obsv->getInvocationObserverWithContext(proxy, operation, *context));
+ }
+ else
+ {
+ ObserverHelperT<Ice::Instrumentation::InvocationObserver>::attach(
+ obsv->getInvocationObserver(proxy, operation));
+ }
}
}
-InvocationObserver::InvocationObserver()
-{
-}
-
void
InvocationObserver::attach(IceProxy::Ice::Object* proxy, const string& operation, const Context* context)
{