From d55371b72cabfd4f31562c15f60854dd0e0b248f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 4 Feb 2015 15:33:13 +0000 Subject: [PATCH 03/13] bus_transaction_send_from_driver: preserve existing return My previous attempt at this impossible situation (I can't think how you could set it up without breaking the client by failing to send its Hello reply, hence it is untested) would have falsely signalled OOM if the client was forbidden from receiving dbus-daemon's reply to a method call. In principle we could return FALSE if we hit OOM while capturing the message, but there's no real need to do so, and the other callers of bus_transaction_capture_error_reply() don't. I'm sure you have noticed this is all rather theoretical. --- bus/connection.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bus/connection.c b/bus/connection.c index 6b18f6f..410aaac 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -2268,8 +2268,11 @@ bus_transaction_send_from_driver (BusTransaction *transaction, "message from dbus-daemon rejected but not enough " "memory to capture it"); } + + /* This is not fatal to the transaction so silently eat the disallowed + * message (see reasoning above) */ dbus_error_free (&error); - return FALSE; + return TRUE; } return bus_transaction_send (transaction, connection, message); -- 2.1.4