Changeset 20 in cheroxy
- Timestamp:
- 11/08/12 17:19:07 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/CRXProxy.h
r18 r20 12 12 { 13 13 private: 14 CRXSocket mClient;14 CRXSocket mClient; 15 15 16 16 public: 17 CRXProxy 17 CRXProxy (const int aSocket = 0); 18 18 19 19 public: 20 int Forward (void); 21 int ForwardMT (void); 20 static CRXProxy * GetNewInstance (const int aSocket = 0); 21 22 public: 23 int Forward (void); 24 int ForwardMT (void); 22 25 }; 23 26 -
trunk/src/CRXProxy.cpp
r19 r20 51 51 } 52 52 53 CRXProxy * 54 CRXProxy::GetNewInstance(const int aSocket) 55 { 56 return new(std::nothrow) CRXProxy (aSocket); 57 } 58 53 59 int 54 60 CRXProxy::ForwardMT (void) … … 93 99 { 94 100 CRX_ERROR_ADD (mClient.GetErrorMessage ().c_str ()); 95 CRX_ERROR (aResult, " failed to receive from browser");101 CRX_ERROR (aResult, "Failed to receive from browser"); 96 102 break; 97 103 } … … 109 115 { 110 116 CRX_ERROR_ADD (aWebServer.GetErrorMessage ().c_str ()); 111 CRX_ERROR (aResult, " failed to connect to server <%s>", aHttpRequest.GetURL ().c_str ());117 CRX_ERROR (aResult, "Failed to connect to server <%s>", aHttpRequest.GetURL ().c_str ()); 112 118 return aResult; 113 119 } … … 119 125 { 120 126 CRX_ERROR_ADD (aWebServer.GetErrorMessage ().c_str ()); 121 CRX_ERROR (aResult, " failed to send to server <%s>", aHttpRequest.GetURL ().c_str ());127 CRX_ERROR (aResult, "Failed to send to server <%s>", aHttpRequest.GetURL ().c_str ()); 122 128 return aResult; 123 129 } … … 132 138 { 133 139 CRX_ERROR_ADD (aWebServer.GetErrorMessage ().c_str ()); 134 CRX_ERROR (aResult, " failed to receive <%s>", aHttpRequest.GetURL ().c_str ());140 CRX_ERROR (aResult, "Failed to receive <%s>", aHttpRequest.GetURL ().c_str ()); 135 141 break; 136 142 } … … 145 151 { 146 152 CRX_ERROR_ADD (mClient.GetErrorMessage ().c_str ()); 147 CRX_ERROR (aResult, " failed to send <%s>", aHttpRequest.GetURL ().c_str ());153 CRX_ERROR (aResult, "Failed to send <%s>", aHttpRequest.GetURL ().c_str ()); 148 154 break; 149 155 } -
trunk/src/main.cpp
r18 r20 60 60 } 61 61 62 if ((aProxy = new(std::nothrow) CRXProxy(aResult)) == NULL)62 if ((aProxy = CRXProxy::GetNewInstance (aResult)) == NULL) 63 63 { 64 64 aResult = -1;
Note:
See TracChangeset
for help on using the changeset viewer.