mirror of https://github.com/acidanthera/audk.git
Fix read issue detected by the following Python program. The issue was that the caller's buffer pointer was not being advanced between segments of the read data.
Signed-off-by: lpleahy ----- UnbufferedRead.py ----- import httplib conn = httplib.HTTPConnection("10.241.97.30") conn.request('GET', '/') resp = conn.getresponse(buffering=True) if resp.status != 200: print "status:", resp.status print "aborting" sys.exit(1) while True: chunk = resp.read() if not chunk: break print chunk git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13077 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
50b43b1506
commit
fcb6f89d01
|
@ -1571,6 +1571,11 @@ EslTcp4Receive (
|
||||||
DataLength ));
|
DataLength ));
|
||||||
CopyMem ( pBuffer, pPacket->pBuffer, DataLength );
|
CopyMem ( pBuffer, pPacket->pBuffer, DataLength );
|
||||||
|
|
||||||
|
//
|
||||||
|
// Set the next buffer address
|
||||||
|
//
|
||||||
|
pBuffer += DataLength;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Determine if the data is being read
|
// Determine if the data is being read
|
||||||
//
|
//
|
||||||
|
|
|
@ -1635,6 +1635,11 @@ EslTcp6Receive (
|
||||||
DataLength ));
|
DataLength ));
|
||||||
CopyMem ( pBuffer, pPacket->pBuffer, DataLength );
|
CopyMem ( pBuffer, pPacket->pBuffer, DataLength );
|
||||||
|
|
||||||
|
//
|
||||||
|
// Set the next buffer address
|
||||||
|
//
|
||||||
|
pBuffer += DataLength;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Determine if the data is being read
|
// Determine if the data is being read
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue