From d9d9639ce16f890026a10451f66bf6c17d3e76d3 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Wed, 21 Feb 2018 13:58:18 +0100 Subject: [PATCH] bus/driver: handle quotas for driver unicasts The bus driver only ever sends solicited unicasts. They're either replies or solicited directed signals (NameAcquired, NameLost). Hence, all unicast-quota-failures must result in a client shutdown. Signed-off-by: David Herrmann --- src/bus/driver.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bus/driver.c b/src/bus/driver.c index 3a66f07c..afec2d02 100644 --- a/src/bus/driver.c +++ b/src/bus/driver.c @@ -377,10 +377,13 @@ static int driver_send_unicast(Peer *receiver, Message *message) { if (r) return error_fold(r); - /* XXX: handle quota */ r = connection_queue(&receiver->connection, NULL, message); - if (r) - return error_fold(r); + if (r) { + if (r != CONNECTION_E_QUOTA) + return error_fold(r); + + connection_shutdown(&receiver->connection); + } return 0; }