http://bugs.winehq.org/show_bug.cgi?id=17263
hooray! very simple fix, here - allow ERROR_MORE_DATA status code as an acceptable error.
... and _check it_, afterwards.
ideally, the loop to read a complete PDU should be vaguely like this:
do { RpcConnection conn->ops->read(data, &len) total_read += len; if GetLastError() == ERROR_MORE_DATA if total_read == total_packet_size return FALSE; /* not ok to return ERROR_MORE_DATA at end of PDU! } while (total_read != total_packet_size);
i.e. you should _expect_ there to be an ERROR_MORE_DATA status code on all but the _very_ last bit of the PDU. but, you can't do that in rpcrt4_conn_np_read() because that function is just a "data getter", it doesn't know when it's being used to grab the last bit of the PDU.
this will prove to be important for catching problems, both internally and also when SMBs are used. _yes_ the SMB system also returns ERROR_MORE_DATA. actually, if NT STATUS codes are enabled, it's STATUS_MORE_PROCESSING_REQUIRED which _do_ go over-the-wire if the smb server negotiates their use, but that's another story.
l.
2009/2/5 Luke Kenneth Casson Leighton luke.leighton@googlemail.com:
The patch looks acceptable in theory. Please email the patch to wine-patches (or wine-devel) and I'll review the implementation of it.
On Fri, Feb 6, 2009 at 10:29 AM, Rob Shearman robertshearman@gmail.com wrote:
2009/2/5 Luke Kenneth Casson Leighton luke.leighton@googlemail.com:
The patch looks acceptable in theory. Please email the patch to wine-patches (or wine-devel) and I'll review the implementation of it.
ok!