ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From susan...@apache.org
Subject cvs commit: ws-axis/c/vc/transport/axis AxisTransport.dsp
Date Wed, 12 May 2004 10:46:07 GMT
susantha    2004/05/12 03:46:07

  Modified:    c/include/axis/server AxisTrace.h
               c/src/common AxisTrace.cpp
               c/src/transport SOAPTransportFactory.cpp
               c/vc/transport/axis AxisTransport.dsp
  Log:
  Some corrections to AxisTrace class to make sure the client side works even without logging
  
  Revision  Changes    Path
  1.13      +1 -0      ws-axis/c/include/axis/server/AxisTrace.h
  
  Index: AxisTrace.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/AxisTrace.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AxisTrace.h	12 May 2004 07:36:46 -0000	1.12
  +++ AxisTrace.h	12 May 2004 10:46:07 -0000	1.13
  @@ -162,6 +162,7 @@
       int openFileByClient();
     
   private:
  +	bool m_bLoggingOn;
       char m_acLine[4];
       char* m_pcLevel;
       AxisFile m_fileTrace;
  
  
  
  1.22      +17 -13    ws-axis/c/src/common/AxisTrace.cpp
  
  Index: AxisTrace.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisTrace.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- AxisTrace.cpp	12 May 2004 07:36:46 -0000	1.21
  +++ AxisTrace.cpp	12 May 2004 10:46:07 -0000	1.22
  @@ -34,6 +34,7 @@
   
   AxisTrace::AxisTrace ()
   {
  +	m_bLoggingOn = false;
   }
   
   AxisTrace::~AxisTrace ()
  @@ -43,28 +44,26 @@
   int AxisTrace::openFile ()
   {
       char* sFileName = g_pConfig->getAxisLogPath ();
  -    //if ((m_fileTrace = fopen (sFileName, "a")) == NULL)
  -    //    return AXIS_FAIL;
  -    //fclose (m_fileTrace);
  +	if (!sFileName) return AXIS_FAIL;
  +#ifndef WIN32
       setFilePerm(sFileName);
  -    //if ((m_fileTrace = fopen (sFileName, "a")) == NULL)
  -    //    return AXIS_FAIL;
  +#endif
       if(AXIS_FAIL == m_fileTrace.fileOpen(sFileName, "a"))
  -        return AXIS_FAIL;                                                             
                                      
  -    return AXIS_SUCCESS;
  +        return AXIS_FAIL;
  +	m_bLoggingOn = true;
  +	return AXIS_SUCCESS;
   }
   
   int AxisTrace::openFileByClient ()
   {
       char* sFileName = g_pConfig->getAxisClientLogPath ();
  -    //if ((m_fileTrace = fopen (sFileName, "a")) == NULL)
  -    //    return AXIS_FAIL;
  -    //fclose (m_fileTrace);
  +	if (!sFileName) return AXIS_FAIL;
  +#ifndef WIN32
       setFilePerm(sFileName);
  -    //if ((m_fileTrace = fopen (sFileName, "a")) == NULL)
  -    //    return AXIS_FAIL; 
  +#endif
       if(AXIS_FAIL == m_fileTrace.fileOpen(sFileName, "a"))
           return AXIS_FAIL;
  +	m_bLoggingOn = true;
       return AXIS_SUCCESS;
   }
   
  @@ -90,6 +89,8 @@
   
   int AxisTrace::logthis (const char* sLog, int level, char* arg2, int arg3)
   {
  +	if (!m_bLoggingOn) return AXIS_FAIL;
  +
       time_t ltime;
       time (&ltime);
   
  @@ -144,12 +145,12 @@
       m_fileTrace.filePuts (sLog);
       m_fileTrace.filePuts (":");
   
  -
       return AXIS_SUCCESS;
   
   }
   int AxisTrace::logaxis (const char* sLog, int level, char* arg2, int arg3)
   {
  +	if (!m_bLoggingOn) return AXIS_FAIL;
       int intResult = logthis(sLog, level, arg2, arg3);
      /* fputs ("\n", m_fileTrace);
       fputs ("-------------------------------------------------", m_fileTrace);
  @@ -168,6 +169,7 @@
   int AxisTrace::logaxis (const char* sLog1, const char* sLog2, int level,
       char* arg3, int arg4)
   {
  +	if (!m_bLoggingOn) return AXIS_FAIL;
       int intResult = logthis(sLog1, level, arg3, arg4);
       if(AXIS_SUCCESS == intResult)
       {
  @@ -193,6 +195,7 @@
   int AxisTrace::logaxis (const char* sLog1, const long nLog2, int level,
       char* arg3, int arg4)
   {
  +	if (!m_bLoggingOn) return AXIS_FAIL;
       char* convToLong = (char*) malloc(4 * sizeof(char));
       int intResult = logthis(sLog1, level, arg3, arg4);
       if(AXIS_SUCCESS == intResult)
  @@ -220,6 +223,7 @@
   int AxisTrace::logaxis (const char* sLog1, const double dLog2, int level,
       char* arg3, int arg4)
   {
  +	if (!m_bLoggingOn) return AXIS_FAIL;
       char* convToDouble = (char*) malloc(4 * sizeof(char));
       int intResult = logthis(sLog1, level, arg3, arg4);
       if(AXIS_SUCCESS == intResult)
  
  
  
  1.2       +4 -0      ws-axis/c/src/transport/SOAPTransportFactory.cpp
  
  Index: SOAPTransportFactory.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/SOAPTransportFactory.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SOAPTransportFactory.cpp	12 May 2004 07:36:47 -0000	1.1
  +++ SOAPTransportFactory.cpp	12 May 2004 10:46:07 -0000	1.2
  @@ -43,7 +43,11 @@
   int SOAPTransportFactory::initialize()
   {
   #ifdef WIN32
  +#ifdef _DEBUG
  +	m_pcLibraryPath = "AxisTransport_D.dll"; //this will be taken from configuration file
  +#else
   	m_pcLibraryPath = "AxisTransport.dll"; //this will be taken from configuration file
  +#endif
   #else
   	m_pcLibraryPath = "libAxisTransport.so"; //this will be taken from configuration file
   #endif
  
  
  
  1.2       +3 -2      ws-axis/c/vc/transport/axis/AxisTransport.dsp
  
  Index: AxisTransport.dsp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/vc/transport/axis/AxisTransport.dsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AxisTransport.dsp	12 May 2004 07:36:48 -0000	1.1
  +++ AxisTransport.dsp	12 May 2004 10:46:07 -0000	1.2
  @@ -40,6 +40,7 @@
   # PROP Use_Debug_Libraries 0
   # PROP Output_Dir "Release"
   # PROP Intermediate_Dir "Release"
  +# PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS"
/D "_USRDLL" /D "AXISTRANSPORT_EXPORTS" /YX /FD /c
   # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS"
/D "_MBCS" /D "_USRDLL" /D "AXISTRANSPORT_EXPORTS" /YX /FD /c
  @@ -52,7 +53,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
  -# ADD LINK32 wsock32.lib /nologo /dll /machine:I386
  +# ADD LINK32 wsock32.lib /nologo /dll /machine:I386 /out:"../../../bin/AxisTransport.dll"
   
   !ELSEIF  "$(CFG)" == "AxisTransport - Win32 Debug"
   
  @@ -78,7 +79,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386
/pdbtype:sept
  -# ADD LINK32 wsock32.lib /nologo /dll /debug /machine:I386 /out:"../../../bin/AxisTransport.dll"
/pdbtype:sept
  +# ADD LINK32 wsock32.lib /nologo /dll /debug /machine:I386 /out:"../../../bin/AxisTransport_D.dll"
/pdbtype:sept
   
   !ENDIF 
   
  
  
  

Mime
View raw message