From: Chris B. <buc...@us...> - 2012-10-11 23:31:04
|
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 ead25ac6511a8638a437de38b7d20ae76fde74f6 (commit) from a49f81e7193321c88d28fd1b5ae515ee8615b7c6 (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 ead25ac6511a8638a437de38b7d20ae76fde74f6 Author: buccella <buc...@li...> Date: Thu Oct 11 19:31:09 2012 -0400 [3574936 ] --disable-debug still allocates trace variables ----------------------------------------------------------------------- Summary of changes: diff --git a/NEWS b/NEWS index 59404ac..8fc5742 100644 --- a/NEWS +++ b/NEWS @@ -116,9 +116,7 @@ Bugs fixed: - 3539563 Memory leak in indCIMXMLHandler when Reliable Inds Enabled - 3539569 Leaks in interopProvider - 3574169 revert interop2 stageschema - -New Features: -- 3501314 Add dynamic logging and syslog output to sfcb trace +- 3574936 --disable-debug still allocates trace variables Changes in 1.3.15 ================= diff --git a/cimRequest.c b/cimRequest.c index 6c98f86..df5bf9c 100644 --- a/cimRequest.c +++ b/cimRequest.c @@ -1791,14 +1791,14 @@ handleCimRequest(CimRequestContext * ctx, int flags, char * more) { RespSegments rs; RequestHdr hdr; + int parserc = 1; /* scanner recognition code + 0 = format understood + 1 = format not understood */ #ifdef SFCB_DEBUG struct rusage us, ue; struct timeval sv, ev; - int parserc = 1; /* scanner recognition code - 0 = format understood - 1 = format not understood */ if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&sv, NULL); diff --git a/cimcClientSfcbLocal.c b/cimcClientSfcbLocal.c index 86444e0..02bc804 100644 --- a/cimcClientSfcbLocal.c +++ b/cimcClientSfcbLocal.c @@ -1212,6 +1212,7 @@ referenceNames(Client * mb, _SFCB_RETURN(NULL); } +#ifdef SFCB_DEBUG static CMPIValue convertFromStringValue(CMPIValue strcval, CMPIType strctype, CMPIType xtype, @@ -1331,6 +1332,7 @@ static CMPIValue convertFromStringValue(CMPIValue strcval, _SFCB_RETURN(newcval); } // convertFromStringValue +#endif static CMPIArgs * convertFromStringArguments(CMPIConstClass *cls, const char *method, @@ -1434,7 +1436,7 @@ static CMPIArgs * convertFromStringArguments(CMPIConstClass *cls, goto addacopy; } // convert the string value to defined type - CMPIValue newcval = convertFromStringValue(cdata.value, cdata.type, cparam.type, prc); + _SFCB_TRACE_VAR(CMPIValue newcval = convertFromStringValue(cdata.value, cdata.type, cparam.type, prc)); if (prc && (prc->rc != CMPI_RC_OK)) { if (0 != vmpt) { goto error2; @@ -1443,7 +1445,7 @@ static CMPIArgs * convertFromStringArguments(CMPIConstClass *cls, prc->rc = CMPI_RC_OK; goto addacopy; } - CMPIStatus lrc = CMAddArg(argsnew, (char*)name->hdl, &newcval, cparam.type); + _SFCB_TRACE_VAR(CMPIStatus lrc = CMAddArg(argsnew, (char*)name->hdl, &newcval, cparam.type)); _SFCB_TRACE(4,("--- IN argument: %s updated with ptype: %u status: %u",(char*)name->hdl,cparam.type,lrc.rc)); continue; } diff --git a/httpAdapter.c b/httpAdapter.c index e7c5a4d..333733a 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -883,19 +883,21 @@ doHttpRequest(CommHndl conn_fd) static RespSegments nullResponse = { NULL, 0, 0, NULL, {{0, NULL}} }; unsigned long len; int hl, - rc, - uset = 0; + rc; char *hdr, *path; int discardInput = 0; MsgSegment msgs[2]; + CimRequestContext ctx; + int breakloop; + int hcrFlags = 0; /* flags to pass to handleCimRequest() */ +#ifdef SFCB_DEBUG + int uset = 0; struct rusage us, ue; struct timeval sv, ev; - CimRequestContext ctx; - int breakloop; - int hcrFlags = 0; /* flags to pass to handleCimRequest() */ +#endif _SFCB_ENTER(TRACE_HTTPDAEMON, "doHttpRequest"); diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index fc2899d..c18a7f9 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -424,8 +424,8 @@ IndCIMXMLHandlerCreateInstance(CMPIInstanceMI * mi, CMSetProperty(ciLocal, "LastSequenceNumber", &zarro, CMPI_sint64); } - CMPIString *str = CDToString(_broker, copLocal, NULL); - CMPIString *ns = CMGetNameSpace(copLocal, NULL); + _SFCB_TRACE_VAR(CMPIString *str = CDToString(_broker, copLocal, NULL)); + _SFCB_TRACE_VAR(CMPIString *ns = CMGetNameSpace(copLocal, NULL)); _SFCB_TRACE(1,("--- handler %s %s", (char *) ns->hdl, (char *) str->hdl)); in = CMNewArgs(_broker, NULL); diff --git a/interopProvider.c b/interopProvider.c index 463300f..d6c8164 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -1608,8 +1608,8 @@ InteropProviderInvokeMethod(CMPIMethodMI * mi, subscriptionHt->ft->getNext(subscriptionHt, i, (void **) &suName, (void **) &su)) { if ((void *) su->fi == filterId) { - CMPIString *str = CDToString(_broker, su->ha->hop, NULL); - CMPIString *ns = CMGetNameSpace(su->ha->hop, NULL); + _SFCB_TRACE_VAR(CMPIString *str = CDToString(_broker, su->ha->hop, NULL)); + _SFCB_TRACE_VAR(CMPIString *ns = CMGetNameSpace(su->ha->hop, NULL)); _SFCB_TRACE(1, ("--- invoke handler %s %s", (char *) ns->hdl, (char *) str->hdl)); @@ -1658,8 +1658,8 @@ InteropProviderInvokeMethod(CMPIMethodMI * mi, CMPIInstance *ci = in->ft->getArg(in, "handler", &st).value.inst; CMPIObjectPath *op = in->ft->getArg(in, "key", &st).value.ref; - CMPIString *str = CDToString(_broker, op, NULL); - CMPIString *ns = CMGetNameSpace(op, NULL); + _SFCB_TRACE_VAR(CMPIString *str = CDToString(_broker, op, NULL)); + _SFCB_TRACE_VAR(CMPIString *ns = CMGetNameSpace(op, NULL)); _SFCB_TRACE(1, ("--- _addHandler %s %s", (char *) ns->hdl, (char *) str->hdl)); @@ -1690,8 +1690,8 @@ InteropProviderInvokeMethod(CMPIMethodMI * mi, else if (strcasecmp(methodName, "_updateHandler") == 0) { CMPIInstance *ci=in->ft->getArg(in,"handler",&st).value.inst; CMPIObjectPath *op=in->ft->getArg(in,"key",&st).value.ref; - CMPIString *str=CDToString(_broker,op,NULL); - CMPIString *ns=CMGetNameSpace(op,NULL); + _SFCB_TRACE_VAR(CMPIString *str=CDToString(_broker,op,NULL)); + _SFCB_TRACE_VAR(CMPIString *ns=CMGetNameSpace(op,NULL)); _SFCB_TRACE(1,("--- _updateHandler %s %s",(char*)ns->hdl,(char*)str->hdl)); updateHandler(ci,op); } diff --git a/providerDrv.c b/providerDrv.c index 74dd48f..03a10cd 100644 --- a/providerDrv.c +++ b/providerDrv.c @@ -1389,8 +1389,8 @@ getClass(BinRequestHdr * hdr, ProviderInfo * info, int requestor) _SFCB_ENTER(TRACE_PROVIDERDRV, "getClass"); - char *cn = CMGetClassName(path, NULL)->hdl; - char *ns = CMGetNameSpace(path, NULL)->hdl; + _SFCB_TRACE_VAR(char *cn = CMGetClassName(path, NULL)->hdl); + _SFCB_TRACE_VAR(char *ns = CMGetNameSpace(path, NULL)->hdl); _SFCB_TRACE(1, ("--- Namespace %s ClassName %s", ns, cn)); if (req->hdr.flags & FL_localOnly) diff --git a/trace.h b/trace.h index 238a863..e7f37f3 100644 --- a/trace.h +++ b/trace.h @@ -31,6 +31,9 @@ extern unsigned long *_ptr_sfcb_trace_mask; #ifdef SFCB_DEBUG +/* to wrap variables used only in trace statements */ +#define _SFCB_TRACE_VAR(f) f; + #define _SFCB_TRACE(LEVEL,STR) \ if ((*_ptr_sfcb_trace_mask & __traceMask) && (LEVEL<=_sfcb_debug) && (LEVEL>0) ) \ _sfcb_trace(LEVEL,__FILE__,__LINE__,_sfcb_format_trace STR); @@ -86,6 +89,7 @@ extern void _sfcb_trap(int n); #else #define _SFCB_TRACE_FUNCTION(n,f) +#define _SFCB_TRACE_VAR(f) #define _SFCB_TRACE(LEVEL,STR) #define _SFCB_ENTER(n,f) #define _SFCB_EXIT() { return; } hooks/post-receive -- SFCB - Small Footprint CIM Broker |