You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2008/01/20 22:13:08 UTC

svn commit: r613678 - /webservices/axis/trunk/c/src/common/AxisTrace.cpp

Author: nadiramra
Date: Sun Jan 20 13:13:07 2008
New Revision: 613678

URL: http://svn.apache.org/viewvc?rev=613678&view=rev
Log:
remove tabs

Modified:
    webservices/axis/trunk/c/src/common/AxisTrace.cpp

Modified: webservices/axis/trunk/c/src/common/AxisTrace.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/common/AxisTrace.cpp?rev=613678&r1=613677&r2=613678&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/AxisTrace.cpp (original)
+++ webservices/axis/trunk/c/src/common/AxisTrace.cpp Sun Jan 20 13:13:07 2008
@@ -50,7 +50,8 @@
     AxisTrace::isTraceOn
 };
 
-int AxisTrace::openFile ()
+int AxisTrace::
+openFile ()
 {
     return initialise(g_pConfig->getAxisConfProperty(AXCONF_LOGPATH), STATE_ON);
 }
@@ -60,95 +61,99 @@
     return initialise(g_pConfig->getAxisConfProperty(AXCONF_CLIENTLOGPATH), STATE_ON);
 }
 
-int AxisTrace::initialise(const char *filename, AxisTraceState newState) 
+int AxisTrace::
+initialise(const char *filename, AxisTraceState newState) 
 {
-	AxisFile *newFile = NULL;
-	int result = AXIS_SUCCESS;
-	if (NULL != filename) 
-	{
-		newFile = new AxisFile();
-		if (NULL == newFile || 
-			AXIS_FAIL == newFile->fileOpen(filename, "a"))
-			result = AXIS_FAIL;
-	}
-
-	if (NULL != m_fileTrace) 
-	{
-		if (AXIS_FAIL == result) 
-		{
-			/*
-			 * If we have failed to open the trace file specified in axiscpp.conf and the
-			 * startup trace file is open then write a sensible error message out to the 
-			 * startup trace file before we close it.
-			 */
-			if (NULL == newFile)
-				traceLineInternal("Failed to open trace file in axiscpp.conf because of no storage");
-			else 
-			{
-				string text = "Failed to open trace file ";
-				text += filename;
-				text += " that was specified by ClientLogPath in axiscpp.conf";
-				traceLineInternal(text.c_str());
-			}
-		}
-		else 
-		{
-			traceLineInternal("Closing the startup trace file");
-		}
-		delete m_fileTrace;
-		m_fileTrace = NULL;
-	}
-	m_bLoggingOn = STATE_OFF;
-
-	if (NULL == filename || AXIS_FAIL == result)
-	{
-		if (NULL != newFile) delete newFile;
-		return AXIS_FAIL;
-	}
+    AxisFile *newFile = NULL;
+    int result = AXIS_SUCCESS;
+    if (NULL != filename) 
+    {
+        newFile = new AxisFile();
+        if (NULL == newFile || 
+            AXIS_FAIL == newFile->fileOpen(filename, "a"))
+            result = AXIS_FAIL;
+    }
+
+    if (NULL != m_fileTrace) 
+    {
+        if (AXIS_FAIL == result) 
+        {
+            /*
+             * If we have failed to open the trace file specified in axiscpp.conf and the
+             * startup trace file is open then write a sensible error message out to the 
+             * startup trace file before we close it.
+             */
+            if (NULL == newFile)
+                traceLineInternal("Failed to open trace file in axiscpp.conf because of no storage");
+            else 
+            {
+                string text = "Failed to open trace file ";
+                text += filename;
+                text += " that was specified by ClientLogPath in axiscpp.conf";
+                traceLineInternal(text.c_str());
+            }
+        }
+        else 
+        {
+            traceLineInternal("Closing the startup trace file");
+        }
+        delete m_fileTrace;
+        m_fileTrace = NULL;
+    }
+    m_bLoggingOn = STATE_OFF;
+
+    if (NULL == filename || AXIS_FAIL == result)
+    {
+        if (NULL != newFile) delete newFile;
+        return AXIS_FAIL;
+    }
 
-	m_fileTrace = newFile;
-	m_bLoggingOn = newState;
+    m_fileTrace = newFile;
+    m_bLoggingOn = newState;
     traceHeader(newState);
-	return AXIS_SUCCESS;
+    return AXIS_SUCCESS;
 }
 
-void AxisTrace::terminate() 
+void AxisTrace::
+terminate() 
 { 
     m_bLoggingOn = STATE_STOPPED;
-	// Deleting m_fileTrace closes the trace file
-	if (NULL != m_fileTrace)
-	    delete m_fileTrace; 
+    // Deleting m_fileTrace closes the trace file
+    if (NULL != m_fileTrace)
+        delete m_fileTrace; 
     m_fileTrace = NULL; 
 }
 
-bool AxisTrace::isTraceOn()
+bool AxisTrace::
+isTraceOn()
 { 
-	switch (m_bLoggingOn)
-	{
-	case STATE_OFF:
-	case STATE_STOPPED:
-		return false;
-
-	case STATE_ON:
-	case STATE_STARTUP:
-		return true;
-	
-	case STATE_UNINITIALISED:
-		return AXIS_SUCCESS==initialise(getenv("AXISCPP_STARTUP_TRACE"),STATE_STARTUP);
-	
-	default:
-		return false;
-	}
+    switch (m_bLoggingOn)
+    {
+    case STATE_OFF:
+    case STATE_STOPPED:
+        return false;
+
+    case STATE_ON:
+    case STATE_STARTUP:
+        return true;
+    
+    case STATE_UNINITIALISED:
+        return AXIS_SUCCESS==initialise(getenv("AXISCPP_STARTUP_TRACE"),STATE_STARTUP);
+    
+    default:
+        return false;
+    }
 }
 
-int AxisTrace::logaxis (const char* sLog1, const char* sLog2, const char *type,
-    const char* file, int line)
+int AxisTrace::
+logaxis (const char* sLog1, const char* sLog2, const char *type,
+         const char* file, int line)
 {
     if (isTraceOn()) return AXIS_FAIL;
 
     string name = file;
-	name += "@";
-	name += line;
+    name += "@";
+    name += line;
 
     string text = sLog1;
     text += ":";
@@ -159,7 +164,8 @@
     return AXIS_SUCCESS;
 }
 
-int AxisTrace::trace (const char *pchLog)
+int AxisTrace::
+trace (const char *pchLog)
 {
     if (pchLog != NULL) {
         traceLine(pchLog);
@@ -167,7 +173,8 @@
     return AXIS_SUCCESS;
 }
 
-void AxisTrace::traceHeader(enum AxisTraceState newState)
+void AxisTrace::
+traceHeader(enum AxisTraceState newState)
 {
     traceLine2("************ Start Display Current Environment ************");
     string text = "Axis C++ libraries built on ";
@@ -178,10 +185,10 @@
 
     time_t ltime;
     time (&ltime);
-	if (STATE_ON==newState)
-	    text = "Runtime trace produced on ";
-	else
-	    text = "Startup trace produced on ";
+    if (STATE_ON==newState)
+        text = "Runtime trace produced on ";
+    else
+        text = "Startup trace produced on ";
     text += ctime (&ltime);
     traceLine2(text.c_str());
 
@@ -190,38 +197,38 @@
         "COMPUTERNAME","USERNAME","HOSTNAME","LANG","LOGIN","LOGNAME",
         "MACHTYPE","OSTYPE","UID","USER"};
     for (unsigned i=0; i<(sizeof(envVars)/sizeof(char*)); i++) 
-	{
+    {
         text = envVars[i];
         const char *value = getenv(envVars[i]);
         if (NULL!=value)
-		{
+        {
             text += "=";
             text += value;
-	        traceLine2(text.c_str());
+            traceLine2(text.c_str());
         }
     }
     traceLine2("************* End Display Current Environment *************");
 
-	if (STATE_STARTUP==newState) return;
+    if (STATE_STARTUP==newState) return;
 
-	// Write out the config settings
-	traceLine("-------------- Config File settings START ----------------");
-	string confLine="";
+    // Write out the config settings
+    traceLine("-------------- Config File settings START ----------------");
+    string confLine="";
 
     const char *confProps[]={
-		"AXCONF_WSDDFILEPATH",		//1
-		"AXCONF_LOGPATH",			//2
-		"AXCONF_CLIENTLOGPATH",		//3
-		"AXCONF_CLIENTWSDDFILEPATH",	//4
-		"AXCONF_AXISHOME",		//5
-		"AXCONF_TRANSPORTHTTP",		//6
-		"AXCONF_TRANSPORTSMTP",		//7
-		"AXCONF_XMLPARSER",		//8
-		"AXCONF_NODENAME",		//9
-		"AXCONF_LISTENPORT",		//10
-		"AXCONF_SSLCHANNEL_HTTP",	//11
-		"AXCONF_CHANNEL_HTTP",		//12
-		"AXCONF_SECUREINFO"};		//13 Please use this number in the #if below
+        "AXCONF_WSDDFILEPATH",        //1
+        "AXCONF_LOGPATH",            //2
+        "AXCONF_CLIENTLOGPATH",        //3
+        "AXCONF_CLIENTWSDDFILEPATH",    //4
+        "AXCONF_AXISHOME",        //5
+        "AXCONF_TRANSPORTHTTP",        //6
+        "AXCONF_TRANSPORTSMTP",        //7
+        "AXCONF_XMLPARSER",        //8
+        "AXCONF_NODENAME",        //9
+        "AXCONF_LISTENPORT",        //10
+        "AXCONF_SSLCHANNEL_HTTP",    //11
+        "AXCONF_CHANNEL_HTTP",        //12
+        "AXCONF_SECUREINFO"};        //13 Please use this number in the #if below
 
 // Check at build time whether the lists of properties are in sync
 #if AXCONF_LAST > 13
@@ -229,45 +236,46 @@
 #endif
 
     for (unsigned j=0; j<sizeof(confProps)/sizeof(char*); j++) 
-	{
+    {
         confLine ="";
-		confLine += confProps[j];
-		confLine += " = ";
+        confLine += confProps[j];
+        confLine += " = ";
 
-	    const char *value = g_pConfig->getAxisConfProperty((g_axconfig)j);
+        const char *value = g_pConfig->getAxisConfProperty((g_axconfig)j);
         if (NULL==value)
-		{
-			confLine += "NULL";
-		}
+        {
+            confLine += "NULL";
+        }
         else 
-		{
+        {
             confLine += value;
         }
         traceLine(confLine.c_str());
     }
 
-	
-	traceLine("-------------- Config File settings END OF ----------------");
+    
+    traceLine("-------------- Config File settings END OF ----------------");
 
 
 }
 
-void AxisTrace::traceLineInternal(const char *type, const char *classname, 
-								  const char *methodname, const void *that, 
-								  const char *parms) 
+void AxisTrace::
+traceLineInternal(const char *type, const char *classname, 
+                  const char *methodname, const void *that, 
+                  const char *parms) 
 {
-	if (!isTraceOn()) return;
+    if (!isTraceOn()) return;
 
-	
+    
 
     PLATFORM_TIMEB timeBuffer;
     PLATFORM_GET_TIME_IN_MILLIS( &timeBuffer );
     struct tm *tm = localtime(&timeBuffer.time);
 
-	const int timelen=256;
-	char strtime[timelen];
-	memset(strtime,0,timelen);
-	strftime(strtime,timelen,"[%d/%m/%Y %H:%M:%S:",tm);
+    const int timelen=256;
+    char strtime[timelen];
+    memset(strtime,0,timelen);
+    strftime(strtime,timelen,"[%d/%m/%Y %H:%M:%S:",tm);
     string text = strtime;
     
     char millis[5];
@@ -275,53 +283,55 @@
     text += millis;
     
     strftime(strtime, timelen, " %Z]", tm);
-	text += strtime;
+    text += strtime;
 
     char threadID[20];
     sprintf(threadID, " %lu ", PLATFORM_GET_THREAD_ID);
-	text += threadID;
+    text += threadID;
+
+    if (NULL==classname) text += "-";
+    else text += classname;
+    text += " ";
+    text += type;
+    if (NULL!=methodname) {
+        text += " ";
+        text += methodname;
+    }
+    text += " ";
+    if (NULL != that) {
+        char prim[32];
+        sprintf(prim,"@%p",that);
+        text += prim;
+        if (NULL!=parms) text += ",";
+    }
 
-	if (NULL==classname) text += "-";
-	else text += classname;
-	text += " ";
-	text += type;
-	if (NULL!=methodname) {
-		text += " ";
-		text += methodname;
-	}
-	text += " ";
-	if (NULL != that) {
-		char prim[32];
-		sprintf(prim,"@%p",that);
-		text += prim;
-		if (NULL!=parms) text += ",";
-	}
-
-	if (NULL != parms) {
-		if (NULL==strchr(parms,'\n')) {
-			text += parms;
-			traceLine2(text.c_str());
-		} else {
-			// Multi-line output
-			text += "------------>";
-			traceLine2(text.c_str());
-			const char *tok = strtok(const_cast<char*>(parms),"\n");
-			while (NULL != tok) {
-				traceLineInternal(tok);
-				tok = strtok(NULL,"\n");
-			}
-		}
-	} else {
-		traceLine2(text.c_str());
-	}
+    if (NULL != parms) {
+        if (NULL==strchr(parms,'\n')) {
+            text += parms;
+            traceLine2(text.c_str());
+        } else {
+            // Multi-line output
+            text += "------------>";
+            traceLine2(text.c_str());
+            const char *tok = strtok(const_cast<char*>(parms),"\n");
+            while (NULL != tok) {
+                traceLineInternal(tok);
+                tok = strtok(NULL,"\n");
+            }
+        }
+    } else {
+        traceLine2(text.c_str());
+    }
 }
 
-void AxisTrace::traceLineInternal(const char *data) 
+void AxisTrace::
+traceLineInternal(const char *data) 
 {
-	traceLineInternal(TRACE_INFO,NULL,NULL,NULL,data);
+    traceLineInternal(TRACE_INFO,NULL,NULL,NULL,data);
 }
 
-void AxisTrace::traceLine2(const char *data) 
+void AxisTrace::
+traceLine2(const char *data) 
 {
     m_fileTrace->filePuts(data);
     m_fileTrace->filePuts("\n");
@@ -329,66 +339,69 @@
     return;
 }
 
-void AxisTrace::traceEntryInternal(const char *className, const char *methodName, 
+void AxisTrace::
+traceEntryInternal(const char *className, const char *methodName, 
     const void *that, int nParms, va_list args)
 {
     if (!isTraceOn()) return;
 
-	try {
-		string line;
-		const char *parms = NULL;
-		if (0<nParms) {
-			for (int i=0; i<nParms; i++) {
-				int type = va_arg(args, int);
-				unsigned len = va_arg(args, unsigned);
-				void *value = va_arg(args, void*);
-				if (0!=i) line += ", ";
-				addParameter(line,type,len,value);
-			}
-			parms = line.c_str();
-		}
+    try {
+        string line;
+        const char *parms = NULL;
+        if (0<nParms) {
+            for (int i=0; i<nParms; i++) {
+                int type = va_arg(args, int);
+                unsigned len = va_arg(args, unsigned);
+                void *value = va_arg(args, void*);
+                if (0!=i) line += ", ";
+                addParameter(line,type,len,value);
+            }
+            parms = line.c_str();
+        }
 
-		traceLineInternal(TRACE_ENTRY,className,methodName,that,parms);
+        traceLineInternal(TRACE_ENTRY,className,methodName,that,parms);
     } catch (...) {
         traceLineInternal(TRACE_EXCEPT,NULL,NULL,NULL,"Unknown exception caught during trace entry");
     }
 }
 
-void AxisTrace::traceExitInternal(const char *className, const char *methodName, const void* that, int returnIndex,
-						  int type, unsigned len, void *value)
+void AxisTrace::
+traceExitInternal(const char *className, const char *methodName, const void* that, int returnIndex,
+                  int type, unsigned len, void *value)
 {
     if (!isTraceOn()) return;
 
-	try {
-		string line;
-		bool added = false;
+    try {
+        string line;
+        bool added = false;
         if (0!=returnIndex) { // Zero means only one return
                line = "@";
                char prim[32];
                sprintf(prim,"%d",returnIndex);
                line += prim;
-			   added = true;
+               added = true;
         }
 
-		if (TRACETYPE_UNKNOWN != type) {
-			if (added) line += " ";
-			addParameter(line,type,len,value);
-			added = true;
-		}
+        if (TRACETYPE_UNKNOWN != type) {
+            if (added) line += " ";
+            addParameter(line,type,len,value);
+            added = true;
+        }
 
-		traceLineInternal(TRACE_EXIT,className,methodName,that,added?line.c_str():NULL);
+        traceLineInternal(TRACE_EXIT,className,methodName,that,added?line.c_str():NULL);
     } catch (...) {
         traceLineInternal(TRACE_EXCEPT,NULL,NULL,NULL,"Unknown exception caught during trace exit");
     }
 }
 
-void AxisTrace::traceCatchInternal(const char *className, const char *methodName, const void* that, int catchIndex,
-						   int type, unsigned len, void *value)
+void AxisTrace::
+traceCatchInternal(const char *className, const char *methodName, const void* that, int catchIndex,
+                   int type, unsigned len, void *value)
 {
     if (!isTraceOn()) return;
 
-	try {
-		string line;
+    try {
+        string line;
         if (0!=catchIndex) { // Zero means only one catch
               line = "@";
               char prim[32];
@@ -397,115 +410,116 @@
               line += " ";
         }
 
-		line += "caught ";
-		if (TRACETYPE_UNKNOWN != type)
-			addParameter(line,type,len,value);
+        line += "caught ";
+        if (TRACETYPE_UNKNOWN != type)
+            addParameter(line,type,len,value);
         else line += "\"...\"";
-		traceLineInternal(TRACE_EXCEPT,className,methodName,that,line.c_str());
+        traceLineInternal(TRACE_EXCEPT,className,methodName,that,line.c_str());
     } catch (...) {
         traceLineInternal(TRACE_EXCEPT,NULL,NULL,NULL,"Unknown exception caught during trace catch");
     }
 }
 
-void AxisTrace::addParameter(string& line, int type, unsigned len, void *value)
+void AxisTrace::
+addParameter(string& line, int type, unsigned len, void *value)
 {
-	char prim[32]; // Plenty big enough to hold a primitive
+    char prim[32]; // Plenty big enough to hold a primitive
       char *pcValue = (char*)value;
-	switch (type) 
-	{
-	case TRACETYPE_CHAR:	sprintf(prim,"%c" ,*((char  *)value));	line += prim;	break;
-	case TRACETYPE_USHORT:	sprintf(prim,"%hu",*((short *)value));	line += prim;	break;
-	case TRACETYPE_SHORT:	sprintf(prim,"%hd",*((short *)value));	line += prim;	break;
-	case TRACETYPE_UINT:	sprintf(prim,"%u" ,*((int   *)value));	line += prim;	break;
-	case TRACETYPE_INT:		sprintf(prim,"%d" ,*((int   *)value));	line += prim;	break;
-	case TRACETYPE_ULONG:	sprintf(prim,"%lu",*((long  *)value));	line += prim;	break;
-	case TRACETYPE_LONG:	sprintf(prim,"%ld",*((long  *)value));	line += prim;	break;
-	case TRACETYPE_DOUBLE:	sprintf(prim,"%f" ,*((double*)value));	line += prim;	break;
-	case TRACETYPE_FLOAT:	sprintf(prim,"%f" ,*((float *)value));	line += prim;	break;
-
-	case TRACETYPE_BOOL:
-		line += *((bool*)value)?"true":"false";
-		break;
+    switch (type) 
+    {
+    case TRACETYPE_CHAR:    sprintf(prim,"%c" ,*((char  *)value));    line += prim;    break;
+    case TRACETYPE_USHORT:    sprintf(prim,"%hu",*((short *)value));    line += prim;    break;
+    case TRACETYPE_SHORT:    sprintf(prim,"%hd",*((short *)value));    line += prim;    break;
+    case TRACETYPE_UINT:    sprintf(prim,"%u" ,*((int   *)value));    line += prim;    break;
+    case TRACETYPE_INT:        sprintf(prim,"%d" ,*((int   *)value));    line += prim;    break;
+    case TRACETYPE_ULONG:    sprintf(prim,"%lu",*((long  *)value));    line += prim;    break;
+    case TRACETYPE_LONG:    sprintf(prim,"%ld",*((long  *)value));    line += prim;    break;
+    case TRACETYPE_DOUBLE:    sprintf(prim,"%f" ,*((double*)value));    line += prim;    break;
+    case TRACETYPE_FLOAT:    sprintf(prim,"%f" ,*((float *)value));    line += prim;    break;
+
+    case TRACETYPE_BOOL:
+        line += *((bool*)value)?"true":"false";
+        break;
 
-	case TRACETYPE_POINTER:	
+    case TRACETYPE_POINTER:    
             pcValue = *((char**)pcValue);
-		sprintf(prim,"%p ",pcValue);	
-		line += prim;	
+        sprintf(prim,"%p ",pcValue);    
+        line += prim;    
             if (NULL!=pcValue) 
-			addDataParameter(line,len,value);
-		break;
-	
-	case TRACETYPE_DATA:	
-		addDataParameter(line,len,value);
-		break;
+            addDataParameter(line,len,value);
+        break;
+    
+    case TRACETYPE_DATA:    
+        addDataParameter(line,len,value);
+        break;
 
-	case TRACETYPE_STRING:	
-		try {
+    case TRACETYPE_STRING:    
+        try {
                   pcValue = *((char**)pcValue);
                   if (NULL==pcValue) line += "<null>";
                   else {
-			    line += "\"";	
-			    line += pcValue;	
-			    line += "\"";
-                  }	
-		} catch (...) {
-			line += "<BADPOINTER>";
-		}
-		break;
-
-	case TRACETYPE_STLSTRING:
-		try {
-			string *str = static_cast<string*>(value);
-			if (str) {
-				line += "\"";	
-   			      line += str->c_str();
-				line += "\"";	
-			} else line += "<BADPOINTER>";
-		} catch (...) {
-			line += "<BADPOINTER>";
-		}
-		break;
-
-	case TRACETYPE_EXCEPTION:
-		try {
-			exception *ex = static_cast<exception*>(value);
-	   	      const char *msg = ex->what();
-			if (NULL==msg) msg = "\?\?\?\?";
-			line += "exception(\"";
-	   	      line += msg;
-			line += "\")";	
-		} catch (...) {
-			line += "<BADPOINTER>";
-		}
-		break;
-
-	case TRACETYPE_AXISEXCEPTION:
-		try {
-			AxisException *ex = static_cast<AxisException*>(value);
-		      const int code = ex->getExceptionCode();
-	   	      const char *msg = ex->what();
-			if (NULL==msg) msg = "\?\?\?\?";
-			line += "AxisException(";	
-   		      line += code;
-   		     	line += ", \"";
-	   	      line += msg;
-			line += "\")";	
-		} catch (...) {
-			line += "<BADPOINTER>";
-		}
-		break;
-
-	case TRACETYPE_ANONYMOUS:
-		line += "<ANONYMOUS>";				
-		break;
-
-	default:
-		sprintf(prim,"%d",type);
-		line += "<UNKNOWNTYPE";				
-		line += prim;
-		line += ">";
-		break;
-	}
+                line += "\"";    
+                line += pcValue;    
+                line += "\"";
+                  }    
+        } catch (...) {
+            line += "<BADPOINTER>";
+        }
+        break;
+
+    case TRACETYPE_STLSTRING:
+        try {
+            string *str = static_cast<string*>(value);
+            if (str) {
+                line += "\"";    
+                     line += str->c_str();
+                line += "\"";    
+            } else line += "<BADPOINTER>";
+        } catch (...) {
+            line += "<BADPOINTER>";
+        }
+        break;
+
+    case TRACETYPE_EXCEPTION:
+        try {
+            exception *ex = static_cast<exception*>(value);
+                 const char *msg = ex->what();
+            if (NULL==msg) msg = "\?\?\?\?";
+            line += "exception(\"";
+                 line += msg;
+            line += "\")";    
+        } catch (...) {
+            line += "<BADPOINTER>";
+        }
+        break;
+
+    case TRACETYPE_AXISEXCEPTION:
+        try {
+            AxisException *ex = static_cast<AxisException*>(value);
+              const int code = ex->getExceptionCode();
+                 const char *msg = ex->what();
+            if (NULL==msg) msg = "\?\?\?\?";
+            line += "AxisException(";    
+                 line += code;
+                    line += ", \"";
+                 line += msg;
+            line += "\")";    
+        } catch (...) {
+            line += "<BADPOINTER>";
+        }
+        break;
+
+    case TRACETYPE_ANONYMOUS:
+        line += "<ANONYMOUS>";                
+        break;
+
+    default:
+        sprintf(prim,"%d",type);
+        line += "<UNKNOWNTYPE";                
+        line += prim;
+        line += ">";
+        break;
+    }
 }
 
 /**
@@ -515,27 +529,28 @@
  * could be increased in the future. Large blocks of storage could be output
  * in a more human-friendly format.
  */
-void AxisTrace::addDataParameter(string& line, unsigned len, void *value) {
-	char prim[32]; // Plenty big enough to hold a primitive
+void AxisTrace::
+addDataParameter(string& line, unsigned len, void *value) {
+    char prim[32]; // Plenty big enough to hold a primitive
       char *pcValue = (char*)value;
-	try {
-		line += "[";
-		for (unsigned i=0; i<len && i<32; i++) {
-			int x = (int)(pcValue[i]);
-			sprintf(prim,"%2.2X",x);
-			line += prim;
-		}
-		line += "] <";
-		for (unsigned j=0; j<len && j<32; j++) {
-			char c = pcValue[j];
-			if (!isprint(c)) c='.';
-			sprintf(prim,"%c",c);
-			line += prim;
-		}
-		line += ">";
-	} catch (...) {
-		line += "<BADPOINTER>";
-	}
+    try {
+        line += "[";
+        for (unsigned i=0; i<len && i<32; i++) {
+            int x = (int)(pcValue[i]);
+            sprintf(prim,"%2.2X",x);
+            line += prim;
+        }
+        line += "] <";
+        for (unsigned j=0; j<len && j<32; j++) {
+            char c = pcValue[j];
+            if (!isprint(c)) c='.';
+            sprintf(prim,"%c",c);
+            line += prim;
+        }
+        line += ">";
+    } catch (...) {
+        line += "<BADPOINTER>";
+    }
 }
 
 AXIS_CPP_NAMESPACE_END



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org