Update of /cvsroot/sblim/sfcb
In directory vz-cvs-3.sog:/tmp/cvs-serv17811
Modified Files:
indCIMXMLHandler.c
Log Message:
[ 3527920 ] RI and http response codes
Signed-off-by: Narasimha Sharoff <nsh...@us...>
Index: indCIMXMLHandler.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- indCIMXMLHandler.c 18 May 2012 15:06:32 -0000 1.52
+++ indCIMXMLHandler.c 21 May 2012 17:24:33 -0000 1.53
@@ -547,6 +547,7 @@
static int id=1;
char *resp;
char *msg;
+ int rc = 0;
if ((hci=internalProviderGetInstance(ref,&st))==NULL) {
setStatus(&st,CMPI_RC_ERR_NOT_FOUND,NULL);
@@ -560,8 +561,10 @@
sprintf(strId,"%d",id++);
xs=exportIndicationReq(ind,strId);
sb=segments2stringBuffer(xs.segments);
- if (exportIndication((char*)dest->hdl,(char*)sb->ft->getCharPtr(sb), &resp, &msg)) {
- setStatus(&st,CMPI_RC_ERR_FAILED,NULL);
+ rc = exportIndication((char*)dest->hdl,
+ (char*)sb->ft->getCharPtr(sb), &resp, &msg);
+ if (rc != 0) {
+ setStatus(&st,rc,NULL);
}
RespSegment rs = xs.segments[5];
UtilStringBuffer* usb = (UtilStringBuffer*)rs.txt;
@@ -972,8 +975,13 @@
// Now send the indication
st = deliverInd(ref, in, ind);
- if (st.rc != 0) {
- if (RIEnabled){
+ switch (st.rc) {
+ case 0: /* Success */
+ case 400: /* Bad Request XML */
+ case 501: /* Not Implemented */
+ break;
+ default:
+ if (RIEnabled){
_SFCB_TRACE(1,("--- Indication delivery failed, adding to retry queue"));
// Indication delivery failed, send to retry queue
// build an element
@@ -1008,6 +1016,7 @@
}
CMRelease(ctxLocal);
}
+ break;
}
CMRelease(ind);
}
|