driver/monitor: monitor all messages sent from the driver
This was an oversight, we should monitor both all messages
submitted to the driver, and all messages originating in the
driver.
@@ -367,6 +367,10 @@ static int driver_monitor(Bus *bus, Peer *sender, Message *message) {
static int driver_send_unicast(Peer *receiver, Message *message) {
int r;
+ r = driver_monitor(receiver->bus, NULL, message);
+ if (r)
+ return error_fold(r);
+
/* XXX: handle quota */
r = connection_queue(&receiver->connection, NULL, message);
if (r)
@@ -571,6 +575,10 @@ static int driver_notify_name_owner_changed(Bus *bus, const char *name, const ch
if (r)
return error_fold(r);
+ r = driver_monitor(bus, NULL, message);
+ if (r)
+ return error_fold(r);
+
r = peer_broadcast(NULL, NULL, NULL, ADDRESS_ID_INVALID, NULL, bus, &filter, message);
if (r)
return error_fold(r);
