|
From: Chris B. <buc...@us...> - 2012-03-02 21:38:02
|
Update of /cvsroot/sblim/sfcb
In directory vz-cvs-3.sog:/tmp/cvs-serv19668
Modified Files:
interopProvider.c ChangeLog NEWS
Log Message:
[ 3496383 ] Faster Return from CBDeliverIndication
Index: NEWS
===================================================================
RCS file: /cvsroot/sblim/sfcb/NEWS,v
retrieving revision 1.649
retrieving revision 1.650
diff -u -d -r1.649 -r1.650
--- NEWS 1 Mar 2012 23:56:43 -0000 1.649
+++ NEWS 2 Mar 2012 21:37:59 -0000 1.650
@@ -40,6 +40,7 @@
- 3483200 duplicate indication deliveries
- 3496061 IndicationSubscription May Be Undeletable
- 3484083 Exclude SFCBIndicationID
+- 3496383 Faster Return from CBDeliverIndication
Changes in 1.3.13
=================
Index: interopProvider.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- interopProvider.c 1 Mar 2012 20:28:22 -0000 1.53
+++ interopProvider.c 2 Mar 2012 21:37:59 -0000 1.54
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <pthread.h>
#include "fileRepository.h"
#include "utilft.h"
#include "trace.h"
@@ -1161,6 +1162,27 @@
_SFCB_RETURN(st);
}
+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(
@@ -1196,6 +1218,8 @@
uint64;
#endif
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;
@@ -1222,7 +1246,17 @@
CMPIString *ns=CMGetNameSpace(su->ha->hop,NULL);
_SFCB_TRACE(1,("--- 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));
}
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/sblim/sfcb/ChangeLog,v
retrieving revision 1.726
retrieving revision 1.727
diff -u -d -r1.726 -r1.727
--- ChangeLog 1 Mar 2012 23:56:43 -0000 1.726
+++ ChangeLog 2 Mar 2012 21:37:59 -0000 1.727
@@ -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
|