Re: Question about adding subscriptions without refresh.

mschonberg <mschonberg@...>

On Thu, 12 Jul 2012, Mark Spielman wrote:

Thanks Mike. Would you like me to post the fix as a proper patch then? Or would you like to look through the submissions and back track on when this was introduced?
I found the problem. We previously had unnecessary #ifdef's that allowed us to
conditionally compile MAMA without any refresh logic. When we removed the
conditional compilation, we erroneously deleted the code that maintained the
list of subscriptions in the parent transport rather than the "refresh"
transport. A patch that restores the correct logic will follow shortly.



-----Original Message-----
From: Michael Schonberg [mailto:mikeschonberg@...] On Behalf Of mschonberg
Sent: Wednesday, July 11, 2012 9:00 PM
To: Mark Spielman
Cc: openmama-dev@...
Subject: Re: [Openmama-dev] Question about adding subscriptions without refresh.


Your fix is correct. The current implementation is clearly wrong. I am not sure when this was introduced, but I suspect it was a recent change. It might be worth looking into.


On Wed, 11 Jul 2012, Mark Spielman wrote:

In developing a transport bridge for openMAMA, I came across what I
believe is an issue with mama/c_cpp/src/c/transport.c. The
mamaTransport_addSubscription() will return MAMA_STATUS_NOMEM if the
self->mRefreshTransport is not set. This blocked us from successfully
establishing a subscription in the case where a refresh was not desired.


I have a patch that I could submit that would change the method to the
following. But before doing so, I’d like to ask if there is anything I
missed? Below is how we updated the code to work.

mamaTransport_addSubscription (mamaTransport    transport,
                               mamaSubscription subscription,
                               void**           result) {
    SubscriptionInfo*   handle = NULL;
    if (self->mRefreshTransport) {
        handle = refreshTransport_allocateSubscInfo
        if (handle == NULL) return MAMA_STATUS_NOMEM;
        handle->mSubscription = subscription;

    *result = handle;

    if (self->mRefreshTransport)
        refreshTransport_addSubscription (self->mRefreshTransport,

    return MAMA_STATUS_OK;








Mark Spielman

Development Lead, Solace Systems Professional Services
+1-613-271-1010 x1021




Openmama-dev mailing list

Join to automatically receive all group messages.