From cccafbd87d6a4cf00b3511402075f7a597e3df9e Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Fri, 12 Feb 2010 18:23:47 +0000 Subject: QPID-2328 - Applied patch from Ian Main git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@909548 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qmf/engine/ResilientConnection.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cpp/src') diff --git a/cpp/src/qmf/engine/ResilientConnection.cpp b/cpp/src/qmf/engine/ResilientConnection.cpp index 9c19e4d460..ab65b8d768 100644 --- a/cpp/src/qmf/engine/ResilientConnection.cpp +++ b/cpp/src/qmf/engine/ResilientConnection.cpp @@ -96,6 +96,7 @@ namespace engine { void bind(SessionHandle handle, char* exchange, char* queue, char* key); void unbind(SessionHandle handle, char* exchange, char* queue, char* key); void setNotifyFd(int fd); + void notify(); void run(); void failure(); @@ -329,6 +330,16 @@ void ResilientConnectionImpl::unbind(SessionHandle handle, sess->session.exchangeUnbind(client::arg::exchange=exchange, client::arg::queue=queue, client::arg::bindingKey=key); } +void ResilientConnectionImpl::notify() +{ + if (notifyFd != -1) + { + int unused_ret; //Suppress warnings about ignoring return value. + unused_ret = ::write(notifyFd, ".", 1); + } +} + + void ResilientConnectionImpl::setNotifyFd(int fd) { notifyFd = fd; @@ -496,3 +507,8 @@ void ResilientConnection::setNotifyFd(int fd) impl->setNotifyFd(fd); } +void ResilientConnection::notify() +{ + impl->notify(); +} + -- cgit v1.2.1