Question about adding subscriptions without refresh.

Mark Spielman

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 (self->mRefreshTransport);


        if (handle == NULL) return MAMA_STATUS_NOMEM;


        handle->mSubscription = subscription;


    *result = handle;


    if (self->mRefreshTransport)

        refreshTransport_addSubscription (self->mRefreshTransport, handle);


    return MAMA_STATUS_OK;









Mark Spielman

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




Join to automatically receive all group messages.