diff options
author | Daniel Mack <zonque@gmail.com> | 2014-02-05 21:35:27 +0100 |
---|---|---|
committer | Daniel Mack <zonque@gmail.com> | 2014-02-05 21:35:27 +0100 |
commit | 33a4642f0a79b8acd4d2050b51482c3d954da252 (patch) | |
tree | 7c744242878a6c49824c914da2d70d4667d2c500 | |
parent | ba1d1887e23f5266cb786f050d791019dbb4058d (diff) | |
download | kdbus-bus-33a4642f0a79b8acd4d2050b51482c3d954da252.tar.gz kdbus-bus-33a4642f0a79b8acd4d2050b51482c3d954da252.tar.bz2 kdbus-bus-33a4642f0a79b8acd4d2050b51482c3d954da252.zip |
connection: send dead reply on KDBUS_RECV_DROP
-rw-r--r-- | connection.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/connection.c b/connection.c index 2160ec2d26f..547fda23037 100644 --- a/connection.c +++ b/connection.c @@ -930,6 +930,7 @@ int kdbus_cmd_msg_recv(struct kdbus_conn *conn, struct kdbus_cmd_recv *recv) { struct kdbus_conn_queue *queue = NULL; + LIST_HEAD(notify_list); int ret = 0; mutex_lock(&conn->lock); @@ -968,8 +969,11 @@ int kdbus_cmd_msg_recv(struct kdbus_conn *conn, /* just drop the message */ if (recv->flags & KDBUS_RECV_DROP) { - if (queue->reply) + if (queue->reply) { kdbus_conn_reply_finish(queue->reply, -EPIPE); + kdbus_notify_reply_dead(queue->src_id, + queue->cookie, ¬ify_list); + } kdbus_conn_queue_remove(conn, queue); kdbus_pool_free_range(conn->pool, queue->off); @@ -1000,6 +1004,9 @@ int kdbus_cmd_msg_recv(struct kdbus_conn *conn, exit_unlock: mutex_unlock(&conn->lock); + + kdbus_conn_kmsg_list_send(conn->ep, ¬ify_list); + return ret; } |