[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: Fix Indentation Error In WIN32 "aRead" Method
From: |
Conrad T. Pino |
Subject: |
Patch: Fix Indentation Error In WIN32 "aRead" Method |
Date: |
Sat, 10 Sep 2005 21:59:11 -0700 |
This patch depends upon patch committed on "dev-bcb6-arm" branch
between revision tags "dev-bcb6-arm-0052" and "dev-bcb6-arm-0053".
This patch modifies the following files:
ChangeLog
src/serial.cpp
This patch is committed on "dev-bcb6-arm" branch between revision
tags "dev-bcb6-arm-0053" and "dev-bcb6-arm-0054".
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnutelephony/testing/commoncpp2/ChangeLog,v
retrieving revision 1.18.2.3
retrieving revision 1.18.2.4
diff -u -p -r1.18.2.3 -r1.18.2.4
--- ChangeLog 11 Sep 2005 04:17:55 -0000 1.18.2.3
+++ ChangeLog 11 Sep 2005 04:19:18 -0000 1.18.2.4
@@ -1,4 +1,5 @@
From Common C++ 1.3.18 to 1.3.19
+- fix indentation error in WIN32 aRead method
- fix WIN32 aRead buffer overflow when Length < available data
- optimize WIN32 aRead and aWrite method zero length request cases
- TTYStream::overflow method writes *all* buffered output when passed EOF
Index: src/serial.cpp
===================================================================
RCS file: /cvsroot/gnutelephony/testing/commoncpp2/src/serial.cpp,v
retrieving revision 1.1.1.1.2.3
retrieving revision 1.1.1.1.2.4
diff -u -p -r1.1.1.1.2.3 -r1.1.1.1.2.4
--- src/serial.cpp 9 Sep 2005 22:29:29 -0000 1.1.1.1.2.3
+++ src/serial.cpp 11 Sep 2005 04:04:56 -0000 1.1.1.1.2.4
@@ -495,16 +495,16 @@ int Serial::aRead(char * Data, const int
memset(&ol, 0, sizeof(OVERLAPPED));
ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- if(ReadFile(dev, Data, dwReadLength, &dwActualLength,
&ol) == FALSE)
+ if(ReadFile(dev, Data, dwReadLength, &dwActualLength, &ol) ==
FALSE)
+ {
+ if(GetLastError() == ERROR_IO_PENDING)
{
- if(GetLastError() == ERROR_IO_PENDING)
- {
- WaitForSingleObject(ol.hEvent,
INFINITE);
- GetOverlappedResult(dev, &ol,
&dwActualLength, TRUE);
- }
- else
- ClearCommError(dev, &dwError, &cs);
+ WaitForSingleObject(ol.hEvent, INFINITE);
+ GetOverlappedResult(dev, &ol, &dwActualLength,
TRUE);
}
+ else
+ ClearCommError(dev, &dwError, &cs);
+ }
if(ol.hEvent != INVALID_HANDLE_VALUE)
CloseHandle(ol.hEvent);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: Fix Indentation Error In WIN32 "aRead" Method,
Conrad T. Pino <=