fix bug 9582. RCL_2_1
authorChad Peckham <chad.peckham@nokia.com>
Wed, 12 Aug 2009 10:09:05 -0500
branchRCL_2_1
changeset 422 92d7efac8a15
parent 416 41f62ef6635e
child 423 d23909ab8f1b
fix bug 9582.
connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp	Tue Aug 11 14:28:59 2009 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp	Wed Aug 12 10:09:05 2009 -0500
@@ -491,7 +491,7 @@
 			COMMLOGOPEN();
 			COMMLOGS("CRealSerialComm::SendDataToPort WriteFile successful\n");
 			BYTE* ptr = (BYTE*)inData;
-			long numBytes = (inSize > 20) ? 20 : inSize;
+			long numBytes = (inSize > 80) ? 80 : inSize;
 			char msg[200];
 			sprintf(msg, "CRealSerialComm::SendDataToPort = ");
 			for (int i = 0; i < numBytes; i++)
@@ -778,7 +778,12 @@
 				}
 				else
 				{
-					done = true;
+					numberProcessed++;
+					usedLen += fullMessageLength;
+					bytesRemaining -= fullMessageLength;
+					ptr += fullMessageLength;
+					if (bytesRemaining < protocolHeaderLength)
+						done = true;
 				}
 			}
 			DeleteMsg(usedLen);