|
From: Michael Chase-S. <mc...@us...> - 2012-01-27 02:05:48
|
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 4d5f6ac79b297dad62c6893edcda2ab50856ec6f (commit)
via d14de74bf848d41e2993dfea8b2a4d706a70f05b (commit)
from 78386f106235d265f8a4b806110123d24f868b0a (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 4d5f6ac79b297dad62c6893edcda2ab50856ec6f
Author: Michael Chase-Salerno <br...@li...>
Date: Thu Jan 26 21:05:14 2012 -0500
3478933 Sequence Number reset issues
commit d14de74bf848d41e2993dfea8b2a4d706a70f05b
Author: Michael Chase-Salerno <br...@li...>
Date: Thu Jan 26 21:03:14 2012 -0500
3478933 Sequence Number reset issues
-----------------------------------------------------------------------
Summary of changes:
diff --git a/ChangeLog b/ChangeLog
index cb2f499..cfc8130 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-26 Michael Chase-Salerno <br...@li...>
+
+ * interopProvider.c, indCIMXMLHandler.c, indRetryTest.sh
+ [ 3478933 ] Sequence Number reset issues
+
2012-01-25 Michael Chase-Salerno <br...@li...>
* providerMgr.c
diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c
index 08d7daa..ba7bbdc 100644
--- a/indCIMXMLHandler.c
+++ b/indCIMXMLHandler.c
@@ -434,7 +434,7 @@ IndCIMXMLHandlerCreateInstance(CMPIInstanceMI * mi,
// set the properties
CMSetProperty(ciLocal, "SequenceContext", &scontext, CMPI_string);
- CMPIValue zarro = {.sint64 = 0 };
+ CMPIValue zarro = {.sint64 = -1 };
CMSetProperty(ciLocal, "LastSequenceNumber", &zarro, CMPI_sint64);
}
@@ -982,7 +982,7 @@ IndCIMXMLHandlerInvokeMethod(CMPIMethodMI * mi,
CMPIValue lastseq = CMGetProperty(hdlr, "LastSequenceNumber", &st).value;
lastseq.sint64++;
// Handle wrapping of the signed int
- if (lastseq.sint64 < 0) lastseq.sint64=1;
+ if (lastseq.sint64 < 0) lastseq.sint64=0;
// Update the last used number in the handler
CMSetProperty(hdlr, "LastSequenceNumber", &lastseq.sint64, CMPI_sint64);
CBModifyInstance(_broker, ctxLocal, hop, hdlr, NULL);
diff --git a/interopProvider.c b/interopProvider.c
index 8a16c82..6e62a1a 100644
--- a/interopProvider.c
+++ b/interopProvider.c
@@ -712,7 +712,6 @@ initInterOp(const CMPIBroker * broker, const CMPIContext *ctx)
&st);
ctxLocal = prepareUpcall((CMPIContext *) ctx);
enm = _broker->bft->enumerateInstances(_broker, ctxLocal, op, NULL, &st);
- CMRelease(ctxLocal);
if (enm) {
while (enm->ft->hasNext(enm, &st)
@@ -741,6 +740,11 @@ initInterOp(const CMPIBroker * broker, const CMPIContext *ctx)
while (enm->ft->hasNext(enm, &st)
&& (ci = (enm->ft->getNext(enm, &st)).value.inst)) {
cop = CMGetObjectPath(ci, &st);
+ // Reset the sequence numbers on sfcb restart
+ CMPIInstance *ldi = _broker->bft->getInstance(_broker, ctxLocal, cop, NULL, NULL);
+ CMPIValue zarro = {.sint64 = -1 };
+ CMSetProperty(ldi, "LastSequenceNumber", &zarro, CMPI_sint64);
+ CBModifyInstance(_broker, ctxLocal, cop, ldi, NULL);
addHandler(ci, cop);
}
CMRelease(enm);
@@ -748,9 +752,7 @@ initInterOp(const CMPIBroker * broker, const CMPIContext *ctx)
_SFCB_TRACE(1, ("--- checking for cim_indicationsubscription"));
op = CMNewObjectPath(broker, "root/interop",
"cim_indicationsubscription", &st);
- ctxLocal = prepareUpcall((CMPIContext *) ctx);
enm = _broker->bft->enumerateInstances(_broker, ctxLocal, op, NULL, &st);
- CMRelease(ctxLocal);
if (enm) {
while (enm->ft->hasNext(enm, &st)
@@ -762,6 +764,7 @@ initInterOp(const CMPIBroker * broker, const CMPIContext *ctx)
}
CMRelease(enm);
}
+ CMRelease(ctxLocal);
_SFCB_EXIT();
}
diff --git a/test/TestProviders/tests/IndRetryTest.sh b/test/TestProviders/tests/IndRetryTest.sh
index ac72f33..4f7df63 100755
--- a/test/TestProviders/tests/IndRetryTest.sh
+++ b/test/TestProviders/tests/IndRetryTest.sh
@@ -314,9 +314,9 @@ fi
# Check sequence numbers
echo -n " Indication flood sequence numbers: "
-i=1
+i=0
f=0
-while [ $i -lt $((lim+1)) ]
+while [ $i -lt $((lim)) ]
do
grep -A1 SequenceNumber $ODIR/SFCB_Listener.txt | grep '<VALUE>'$i'</VALUE>' > /dev/null 2>&1
if [ $? -eq 0 ]
@@ -333,12 +333,13 @@ then
echo "PASSED"
else
echo "$f missing: FAILED"
+ RC=1
fi
###
# Cleanup and exit
###
-cleanup
+#cleanup
# Set Indication_Service back to the defaults
./GenMI.pl 20 3 2592000 2
if [ $? -ne 0 ]
hooks/post-receive
--
SFCB - Small Footprint CIM Broker
|