Re: Question about adding subscriptions without refresh.

Mark Spielman

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?


-----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




Join to automatically receive all group messages.