ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/src/transport/libwww LibWWWTransport.cpp
Date Tue, 03 Aug 2004 04:17:27 GMT
samisa      2004/08/02 21:17:27

  Modified:    c/src/transport/libwww LibWWWTransport.cpp
  Log:
  Updates for thread safety
  
  Revision  Changes    Path
  1.6       +8 -4      ws-axis/c/src/transport/libwww/LibWWWTransport.cpp
  
  Index: LibWWWTransport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/libwww/LibWWWTransport.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LibWWWTransport.cpp	2 Aug 2004 04:40:10 -0000	1.5
  +++ LibWWWTransport.cpp	3 Aug 2004 04:17:27 -0000	1.6
  @@ -292,10 +292,9 @@
   #ifdef HT_EXT_CONTINUE    //this block sends the message immediately after HTTP headers
                    //without using 100-continue
       
  -    HTRequest_setOutputFormat(m_pRequest, WWW_SOURCE);
  +    //HTRequest_setOutputFormat(m_pRequest, WWW_SOURCE);
       HTRequest_setOutputFormat(m_pRequest, HTAtom_for ("text/xml"));
       HTRequest_setMethod(m_pRequest, METHOD_EXT_0);
  -    HTMethod_setExtensionMethod(METHOD_EXT_0, "POST", NO);
           
       if(HTRequest_setMessageBody(m_pRequest, m_pcData) == NO)
           return TRANSPORT_FAILED;
  @@ -402,21 +401,26 @@
   }
   }
   
  +int inited = 0;
   extern "C" {
   STORAGE_CLASS_INFO
   void initializeLibrary(void)
   {
  +    if(inited) //make sure the lib is initialized only once per client
  +        return;
       //Create a new non-premptive client
       //HTProfile_newNoCacheClient("AxisCpp", "1.3");
       //Create a new non-premptive client (in this case no event loop is required)
       HTProfile_newPreemptiveClient("AxisCpp", "1.3");
  +    inited = 1;
       //Disable interactive mode, could be useful when debugging
       HTAlert_setInteractive(NO);
       // Add our own filter to do the clean up after response received
       HTNet_addAfter(terminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST);
       //How long we are going to wait for a response
  -    HTHost_setEventTimeout(50000);
  +    HTHost_setEventTimeout(5000);
   
  +    HTMethod_setExtensionMethod(METHOD_EXT_0, "POST", NO);
   }
   }
   
  @@ -425,7 +429,7 @@
   void uninitializeLibrary(void)
   {
       //Terminate libwww 
  -    HTProfile_delete();
  +//    HTProfile_delete();
   }
   }
   
  
  
  

Mime
View raw message