D-Bus 1.6.12
|
this function can be a lot more clever. For example it can probably always return a buffer size to read exactly the body of the next message, thus avoiding any memory wastage or reallocs.
we need to enforce a max length on strings in header fields.
we need to check that the proper named header fields exist for each message type.
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.
write a unit test
memcmp is probably faster
write a unit test
memcmp is probably faster
DBusTypeReader currently takes "const" versions of the type and value strings, and this function modifies those strings by casting away the const, which is of course bad if we want to get picky. (To be truly clean you'd have an object which contained the type and value strings and set_basic would be a method on that object... this would also make DBusTypeReader the same thing as DBusTypeMark. But since DBusMessage is effectively that object for D-Bus it doesn't seem worth creating some random object.)
optimize this by only rewriting until the old and new values are at the same alignment. Frequently this should result in only replacing the value that's immediately at hand.
this is inconsistent with most of DBusString in that it allows a start,len range that extends past the string end.
change spec to disallow more things, such as spaces in the path name
support DBUS_TYPE_STRUCT and DBUS_TYPE_VARIANT and complex arrays
If this fails due to lack of memory, the message is hosed and you have to start over building the whole message.
some SASL profiles require sending the empty string as a challenge/response, but we don't currently allow that in our protocol.
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
Thread safety hasn't been tested much for DBusServer
Need notification to apps of disconnection, may matter for some transports