need to be able to escape ';' and ',' in the key values, and the parsing needs to handle that.
DBusAuth really needs to be rewritten as an explicit state machine. Right now it's too hard to prove to yourself by inspection that it works.
right now sometimes both ends will block waiting for input from the other end, e.g. if there's an error during DBUS_COOKIE_SHA1.
the cookie keyring needs to be cached globally not just per-auth (which raises threadsafety issues too)
grep FIXME in dbus-auth.c
if we get an error reply, it has to be converted into DBusError and returned
right now a message filter gets run on replies to a pending call in here, but not in the case where we block without entering the main loop. Simple solution might be to just have the pending call stuff run before the filters.
FIXME what if we call out to application code to handle a message, holding the dispatch lock, and the application code runs the main loop and dispatches again? Probably deadlocks at the moment. Maybe we want a dispatch status of DBUS_DISPATCH_IN_PROGRESS, and then the GSource etc. could handle the situation?
Should probably demarshal to a DBusString, having memcpy() in here is Evil(tm).
we need to enforce a max length on strings in header fields.
If a message has unknown type, we should probably eat it right here rather than passing it out to applications. However it's not an error to see messages of unknown type.
We need to free the argument data when an error occurs.
maybe to make this threadsafe, it should be steal_reply(), i.e. only one thread can ever get the message
Need notification to apps of disconnection, may matter for some transports
memcmp is probably faster
avoid inserting the source into dest, then deleting the replaced chunk of dest (which creates a potentially large intermediate string). Instead, extend the replaced chunk of dest with padding to the same size as the source chunk, then copy in the source bytes.
change spec to disallow more things, such as spaces in the path name