[PATCH 03/12] Fix prerecap property

Ian Bell <IBell@...>

From 2e789ee98d81820a950a1679929d49c38c1eed13 Mon Sep 17 00:00:00 2001

Message-Id: <2e789ee98d81820a950a1679929d49c38c1eed13.1351009358.git.ibell@...>

In-Reply-To: <180145dfd9a175bb1b824b63df34a41b7e97d425.1351009358.git.ibell@...>

References: <180145dfd9a175bb1b824b63df34a41b7e97d425.1351009358.git.ibell@...>

From: Ian Bell <ibell@...>

Date: Tue, 23 Oct 2012 14:14:43 +0100

Subject: [PATCH 03/12] Fix prerecap property


Modified the prerecap property to include the middleware idnetifier.


Signed-off-by: Ian Bell <ibell@...>


mama/c_cpp/src/c/transport.c |    7 ++++---

1 file changed, 4 insertions(+), 3 deletions(-)


diff --git a/mama/c_cpp/src/c/transport.c b/mama/c_cpp/src/c/transport.c

index c9876ef..8c8c9df 100644

--- a/mama/c_cpp/src/c/transport.c

+++ b/mama/c_cpp/src/c/transport.c

@@ -455,13 +455,13 @@ static void setFtStrategy (mamaTransport transport)



-static void enablePreRecapCache (mamaTransport transport)

+static void enablePreRecapCache (mamaTransport transport, const char* middleware)


     char propNameBuf[256];

     if (!self) return;

-    snprintf (propNameBuf, 256, "mama.transport.%s.prerecapcache.enable", self->mName);

+    snprintf (propNameBuf, 256, "mama.%s.transport.%s.prerecapcache.enable", middleware, self->mName);

     self->mPreRecapCacheEnabled = strtobool (mama_getProperty (propNameBuf));

@@ -865,7 +865,7 @@ mamaTransport_create (mamaTransport transport,

     setPreInitialStrategy ((mamaTransport)self);

     setDQStrategy ((mamaTransport)self);

     setFtStrategy ((mamaTransport)self);

-    enablePreRecapCache ((mamaTransport)self);

+    enablePreRecapCache ((mamaTransport)self, middleware);

     if (mamaTransportImpl_disableDisconnectCb (name))


@@ -2606,6 +2606,7 @@ void mamaTransportImpl_clearTransportWithListeners (transportImpl *impl)

         refreshTransport_iterateListeners (impl->mRefreshTransport,

                 mamaTransportImpl_clearTransportCallback, NULL);


+    /* Otherwise iterate the local list of subscriptions. */



         list_for_each (impl->mListeners, mamaTransportImpl_clearTransportCallback, NULL);



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.