From: Michael Chase-S. <mc...@us...> - 2012-05-16 16:12:40
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv6015 Modified Files: ChangeLog control.h indCIMXMLHandler.c interopProvider.c Log Message: [ 3513390 ] Enforce LD and subscription limits Use hashtable instead of EI Index: control.h =================================================================== RCS file: /cvsroot/sblim/sfcb/control.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- control.h 24 Jun 2011 20:13:20 -0000 1.5 +++ control.h 16 May 2012 16:12:37 -0000 1.6 @@ -28,5 +28,6 @@ int getControlNum(char *id, long *val); int getControlBool(char *id, int *val); const char * sfcBrokerStart; +static int LDcount=0; #endif Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- indCIMXMLHandler.c 11 May 2012 20:05:11 -0000 1.50 +++ indCIMXMLHandler.c 16 May 2012 16:12:37 -0000 1.51 @@ -50,7 +50,6 @@ extern void memLinkObjectPath(CMPIObjectPath *op); static const CMPIBroker *_broker; -static int LDcount=-1; static int interOpNameSpace(const CMPIObjectPath *cop, CMPIStatus *st) { @@ -879,49 +878,11 @@ _SFCB_RETURN(0); } -int countLD (const CMPIContext * ctx) { - _SFCB_ENTER(TRACE_INDPROVIDER, "countLD"); - CMPIEnumeration *enm; - CMPIStatus st = { CMPI_RC_OK, NULL }; - LDcount++; // Mark it initialized - - // Enumerate the destinations - CMPIContext * ctxLocal = prepareUpcall((CMPIContext *)ctx); - CMPIObjectPath *ref=CMNewObjectPath(_broker,"root/interop","cim_listenerdestination",&st); - enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); - while(enm && enm->ft->hasNext(enm, &st)) { - LDcount++; - enm->ft->getNext(enm, &st); - } - ref = CMNewObjectPath(_broker,"root/interop","cim_listenerdestinationcimxml",&st); - enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); - while(enm && enm->ft->hasNext(enm, &st)) { - LDcount++; - enm->ft->getNext(enm, &st); - } - ref = CMNewObjectPath(_broker,"root/interop","cim_indicationhandlercimxml",&st); - enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); - while(enm && enm->ft->hasNext(enm, &st)) { - LDcount++; - enm->ft->getNext(enm, &st); - } - - CMRelease(ref); - CMRelease(ctxLocal); - _SFCB_TRACE(1,("--- initial count of destinations: %d.",LDcount)); - - _SFCB_RETURN(0); -} - int initIndCIMXML (const CMPIContext * ctx) { _SFCB_ENTER(TRACE_INDPROVIDER, "initIndCIMXML"); //Refill the queue if there were any from the last run refillRetryQ(ctx); - if ( LDcount == -1 ) { - //Get the count of ListenerDestinations - countLD(ctx); - } _SFCB_RETURN(0); } Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- interopProvider.c 13 Apr 2012 23:48:19 -0000 1.59 +++ interopProvider.c 16 May 2012 16:12:37 -0000 1.60 @@ -59,7 +59,6 @@ static const CMPIBroker *_broker; static int firstTime=1; - typedef struct filter { CMPIInstance *fci; QLStatement *qs; @@ -773,6 +772,10 @@ getControlNum("indicationDeliveryThreadTimeout",&IND_THREAD_TO); sem_init(&availThreadsSem, 0, MAX_IND_THREADS); + if (handlerHt) { + // Set the initial count of Listener Destinations + LDcount=handlerHt->ft->size(handlerHt); + } _SFCB_EXIT(); } Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.764 retrieving revision 1.765 diff -u -d -r1.764 -r1.765 --- ChangeLog 11 May 2012 20:05:11 -0000 1.764 +++ ChangeLog 16 May 2012 16:12:37 -0000 1.765 @@ -1,3 +1,9 @@ +2012-05-16 Michael Chase-Salerno <br...@li...> + + * control.h, indCIMXMLHandler.c, interopServerProvider.c: + [ 3513390 ] Enforce LD and subscription limits + Use hashtable instead of EI + 2012-05-11 Chris Buccella <buc...@li...> * instance.c, indCIMXMLHandler.c, internalProvider.c, |