From: Chris B. <buc...@us...> - 2012-03-03 04:11:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 167b36f1b44dab4a4c717ac26eea27546af12414 (commit) from 56a17186335902e028aa58bae311d0b8410c94cf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 167b36f1b44dab4a4c717ac26eea27546af12414 Author: buccella <buc...@li...> Date: Fri Mar 2 23:12:09 2012 -0500 [ 3496383 ] Faster Return from CBDeliverIndication ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 4015dda..40a8adc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-02 Chris Buccella <buc...@li...> + + * interopProvider.c: + [ 3496383 ] Faster Return from CBDeliverIndication + 2012-03-01 Michael Chase-Salerno <br...@li...> * indCIMXMLHandler.c, indRetryTest.sh diff --git a/NEWS b/NEWS index db66482..8b5fb28 100644 --- a/NEWS +++ b/NEWS @@ -104,6 +104,7 @@ Bugs Fixed: - 3495343 Bad pointer references in trace statements - 3495801 Correction to 3495343 - 3496061 IndicationSubscription May Be Undeletable +- 3496383 Faster Return from CBDeliverIndication Changes in 1.3.13 ================= diff --git a/interopProvider.c b/interopProvider.c index 096933f..a40e1b1 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <string.h> #include <ctype.h> +#include <pthread.h> #include "fileRepository.h" #include <sfcCommon/utilft.h> #include "trace.h" @@ -1284,6 +1285,28 @@ InteropProviderMethodCleanup(CMPIMethodMI * mi, * ------------------------------------------------------------------------- */ +typedef struct delivery_info { + const CMPIContext* ctx; + CMPIObjectPath *hop; + CMPIArgs* hin; +} DeliveryInfo; + +void * sendIndForDelivery(void *di) { + + _SFCB_ENTER(TRACE_INDPROVIDER, "sendIndForDelivery"); + + DeliveryInfo* delInfo; + delInfo = (DeliveryInfo*)di; + CBInvokeMethod(_broker,delInfo->ctx,delInfo->hop,"_deliver",delInfo->hin,NULL,NULL); + + CMRelease((CMPIContext*)delInfo->ctx); + CMRelease(delInfo->hop); + CMRelease(delInfo->hin); + free(di); + pthread_exit(NULL); +} + + CMPIStatus InteropProviderInvokeMethod(CMPIMethodMI * mi, const CMPIContext *ctx, @@ -1320,6 +1343,9 @@ InteropProviderInvokeMethod(CMPIMethodMI * mi, char *ns = (char *) CMGetArg(in, "namespace", NULL).value.string->hdl; + pthread_t ind_thread; + pthread_attr_t it_attr; + // Add indicationFilterName to the indication Filter *filter = filterId; CMPIData cd_name = CMGetProperty(filter->fci, "name", &fn_st); @@ -1349,8 +1375,17 @@ InteropProviderInvokeMethod(CMPIMethodMI * mi, ("--- invoke handler %s %s", (char *) ns->hdl, (char *) str->hdl)); CMAddArg(hin, "subscription", &su->sci, CMPI_instance); - CBInvokeMethod(_broker, ctx, su->ha->hop, "_deliver", hin, NULL, - &st); + + pthread_attr_init(&it_attr); + pthread_attr_setdetachstate(&it_attr, PTHREAD_CREATE_DETACHED); + + DeliveryInfo* di = malloc(sizeof(DeliveryInfo)); + di->ctx = native_clone_CMPIContext(ctx); + di->hop = CMClone(su->ha->hop, NULL); + di->hin = CMClone(hin, NULL); + + pthread_create(&ind_thread, &it_attr,&sendIndForDelivery,(void *) di); + _SFCB_TRACE(1, ("--- invoke handler status: %d", st.rc)); } } hooks/post-receive -- SFCB - Small Footprint CIM Broker |