win32: handle ERROR_MORE_DATA
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Tue, 7 Aug 2012 23:08:15 +0000 (01:08 +0200)
committerMarc-André Lureau <marcandre.lureau@gmail.com>
Mon, 20 Aug 2012 15:10:31 +0000 (17:10 +0200)
commit4b5d762d5d73af90de49801ecc1da52d4cd86d6f
tree66b11b82ba2f366b61ec1fd5da78307e195d9421
parent23d80a04da43c08f4ea626283607a7546d7a56db
win32: handle ERROR_MORE_DATA

If a named pipe is being read in message mode and the next message is
longer than the nNumberOfBytesToRead parameter specifies, ReadFile
returns FALSE and GetLastError returns ERROR_MORE_DATA.

Since the API doesn't allow to return both a GError and the number of
bytes read so far, it makes more sense to return nread, and let the
client call GetLastError() himself to check if ERROR_MORE_DATA.

The current alternative loses the nread information.

https://bugzilla.gnome.org/show_bug.cgi?id=679288
gio/gwin32inputstream.c