[PATCH 02/12] Fix preinitial cache size


Ian Bell <IBell@...>
 

From fbe930442c65730d0a98adb87e58ff143c6f91e3 Mon Sep 17 00:00:00 2001

Message-Id: <fbe930442c65730d0a98adb87e58ff143c6f91e3.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:12:56 +0100

Subject: [PATCH 02/12] Fix preinitial cache size

 

Fixed an issue with the preinitial cache size.  No matter what value was

specified in config it was always set to the default size of 10.

 

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

---

mama/c_cpp/src/c/subscription.c |    5 ++++-

1 file changed, 4 insertions(+), 1 deletion(-)

 

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

index 7987eb2..d873139 100644

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

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

@@ -2495,6 +2495,10 @@ mama_status mamaSubscription_allocate(mamaSubscription *subscription)

                 /* Write the value out in a log message. */

                 mama_log (MAMA_LOG_LEVEL_FINE, "PreInitialCacheSize set to %d", impl->mPreInitialCacheSize);

             }

+            else

+            {

+                impl->mPreInitialCacheSize = MAMA_SUBSCRIPTION_DEFAULT_PREINITIALCACHESIZE;

+            }

             /* Create the mutex, this is used to protect access during create and

              * destroy operations.

@@ -2512,7 +2516,6 @@ mama_status mamaSubscription_allocate(mamaSubscription *subscription)

            impl->mSubscMsgType           = MAMA_SUBSC_SUBSCRIBE;

             impl->mAppDataType            = MAMA_MD_DATA_TYPE_STANDARD;

             impl->mDebugLevel             = MAMA_LOG_LEVEL_WARN;

-            impl->mPreInitialCacheSize    = MAMA_SUBSCRIPTION_DEFAULT_PREINITIALCACHESIZE;

             /* Set the initial state of the subscription now that the memory has been allocated. */

             wInterlocked_initialize(&impl->mState);

--

1.7.9.5

 




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.