Issue with _dbus_write_socket on windows

Havoc Pennington hp at redhat.com
Sat Nov 18 12:45:33 PST 2006


Ralf Habacker wrote:
>> In any case, I would not name the thing in question here 
>> write_stream() since this can't be just any stream; it can't be a 
>> socket; it has to be a pipe. So I'd name the function write_pipe() or 
>> write_file_handle() or something like that. I don't know Windows well 
>> enough to make the right choice.
>>
> This requires to rename some more references to dbus_read/write_socket 
> in main.c and bus.c

More renaming or code changes are fine. The point is, at every call site 
that does a read/write we need to *know* whether the thing we're 
reading/writing is a socket or a unix fd or a windows file handle or a 
windows-unix-compat-runtime-handle-if-this-is-different. And then call 
only the functions that work on that kind of stream.

On unix, we don't need to know this, because all fds are the same from a 
read/write standpoint. But in cross-platform or windows-specific code, 
that just is not the case.

Havoc



More information about the dbus mailing list