]> git.ipfire.org Git - thirdparty/dbus.git/commit
connection, transport: Assert that timeout >= -1 where it matters
authorSimon McVittie <smcv@collabora.com>
Fri, 16 May 2025 11:02:52 +0000 (12:02 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 23 May 2025 10:36:33 +0000 (10:36 +0000)
commit481c3cd16881097bd0077fa8f04924b39057a044
tree393a17dbccb7f0541b9ca1df53ec18be78fcbcc1
parente3dcdc6227e8578bbc29d49210e931c7344a0f37
connection, transport: Assert that timeout >= -1 where it matters

We recommend that assertions are disabled in production builds of dbus,
which means that they are "cheap" to add to development builds as
"executable documentation" for our assumptions.

Lower-level code assumes that timeouts must be either -1 to block
forever, or non-negative to block for a finite time (but possibly 0,
to poll without blocking).

Signed-off-by: Simon McVittie <smcv@collabora.com>
dbus/dbus-connection.c
dbus/dbus-transport.c