static void avis_callback( Subscription* subcription, Attributes* attributes, bool secure, void* subscriber) { wombatQueue queue = NULL; /* cant do anything without a subscriber */ if (!avisSub(subscriber)) { mama_log (MAMA_LOG_LEVEL_ERROR, "avis_callback(): called with NULL subscriber!"); return; } /*Make sure that the subscription is processing messages*/ if ((!avisSub(subscriber)->mIsNotMuted) || (!avisSub(subscriber)->mIsValid)) return; mamaQueue_getNativeHandle(avisSub(subscriber)->mQueue, &queue); if (!queue) { mama_log (MAMA_LOG_LEVEL_ERROR, "avis_callback(): " "Could not get event queue."); return; } wombatQueue_enqueue (queue, avis_queue_callback, attributes_clone(attributes), subscriber); return; }
static void avis_callback( Subscription* subcription, Attributes* attributes, bool secure, void* subscriber) { /* cant do anything without a subscriber */ if (!avisSub(subscriber)) { mama_log (MAMA_LOG_LEVEL_ERROR, "avis_callback(): called with NULL subscriber!"); return; } /*Make sure that the subscription is processing messages*/ if ((!avisSub(subscriber)->mIsNotMuted) || (!avisSub(subscriber)->mIsValid)) return; avisCallbackContext* ctx = (avisCallbackContext*) malloc (sizeof (avisCallbackContext)); ctx->attributes = attributes_clone (attributes); ctx->subscriber = subscriber; mamaQueue_enqueueEvent (avisSub (subscriber)->mQueue, avis_queue_callback, ctx); }