fix bug 9582
authorChad Peckham <chad.peckham@nokia.com>
Wed, 12 Aug 2009 10:12:21 -0500
changeset 424 9f38f9ad4716
parent 421 7bf2b8a16445
child 425 33a58f7aa2f4
fix bug 9582
connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp	Wed Aug 12 09:26:04 2009 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp	Wed Aug 12 10:12:21 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);