From: David Herrmann Date: Thu, 23 Oct 2014 12:02:55 +0000 (+0200) Subject: connection: make sure to delete reply_wake entries X-Git-Tag: upstream/0.20141102.012929utc~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f05bf6149f72ba6642558066feb671565bd392e;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git connection: make sure to delete reply_wake entries If we reply to a pending method call, we must make sure to only allow a single connection to respond. Therefore, unqueue reply_wake entries unconditionally after we allowed a single call to pass through. Signed-off-by: David Herrmann --- diff --git a/connection.c b/connection.c index ad467ea..68b0cad 100644 --- a/connection.c +++ b/connection.c @@ -425,12 +425,11 @@ static int kdbus_conn_check_access(struct kdbus_ep *ep, list_for_each_entry_safe(r, tmp, &conn_src->reply_list, entry) { if (r->reply_dst == conn_dst && r->cookie == msg->cookie_reply) { - if (r->sync) { + list_del_init(&r->entry); + if (r->sync) *reply_wake = kdbus_conn_reply_ref(r); - } else { - list_del_init(&r->entry); + else kdbus_conn_reply_unref(r); - } allowed = true; break;