--- a/applayerpluginsandutils/httpprotocolplugins/httpclient/chttprequestbatcher.cpp Thu Aug 19 10:27:19 2010 +0300
+++ b/applayerpluginsandutils/httpprotocolplugins/httpclient/chttprequestbatcher.cpp Tue Aug 31 15:44:10 2010 +0300
@@ -68,25 +68,12 @@
#if defined (_DEBUG) && defined (_LOGGING)
__FLOG_0(_T8("!! Send the first request i.e. not batching"));
#endif
-
- // This function will be called when the request is sent first time on a newly
- // opened connection. So no need to mark it as sending...
+
iOutputStream->SendDataReqL(aBuffer);
}
void CHttpRequestBatcher::SendRequestsBatchedL(const TDesC8& aBuffer)
{
- if(iSendingRequest)
- {
- // The batcher is not having enough data [batching buffer size] size
- // available. It would have been requested the supplier to provide more data.
- // By the time the timer would have been expired and the batcher would have been sent the data.
- // Before the notificaiton of the confirmation of data is sent the supplier can give more data
- // to the batcher which will make the batcher to send the data again and double RSocket :: Send
- // will cause the panic.. At this point the excess data will be empty
- iExcessData.Set(aBuffer);
- return; // Dont send the data here. Send once the confirmation of previous send has received
- }
StartTimer();
BatchRequestsL(aBuffer);
@@ -119,7 +106,6 @@
#endif
// Send the request with a filled-up buffer
- iSendingRequest = ETrue;
iOutputStream->SendDataReqL(iDataToSend);
// Save the excess data from this request
@@ -202,7 +188,6 @@
void CHttpRequestBatcher::SendDataCnfL()
{
- iSendingRequest = EFalse; // Confirmation of data send has received. reset the flag
// If this is the first request send a confirmation to the observer that the data
// has been sent and then set the function pointer to the SendRequestBatched() method.
if (iFuncPtr == &CHttpRequestBatcher::SendRequestImmediatelyL)
@@ -250,7 +235,6 @@
// It's possible that the excess data is larger than the maximum allowable size of the buffer in
// which case this excess data is used to fill up another buffer and a request made.
iDataToSend.Append(iExcessData.Left(iMaxBufferSize));
- iSendingRequest = ETrue;
iOutputStream->SendDataReqL(iDataToSend);
iExcessData.Set(iExcessData.Mid(iMaxBufferSize));
}
@@ -306,7 +290,6 @@
#endif
// Timer has completed before the buffer has been filled, therefore send the request now.
- iSendingRequest = ETrue;
iOutputStream->SendDataReqL(iDataToSend);
}
iTimerCompleted = ETrue;
@@ -336,9 +319,9 @@
void CHttpRequestBatcher::SetTCPCorking(TBool aValue )
{
if (iOutputStream)
- {
- iOutputStream->SetTCPCorking(aValue);
- }
+ {
+ iOutputStream->SetTCPCorking(aValue);
+ }
}