From: Suchang Woo Date: Mon, 10 Aug 2015 13:24:04 +0000 (+0900) Subject: library: remove request in hash table on timeout X-Git-Tag: accepted/tizen/mobile/20150811.014122^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47c50883be68f56f98d152963b3ee0225c07c97d;p=platform%2Fcore%2Fsystem%2Fbuxton2.git library: remove request in hash table on timeout Change-Id: I91732c69bc7dec2d26c7fc488a2642e073ad3763 Signed-off-by: Suchang Woo --- diff --git a/lib/buxton2.c b/lib/buxton2.c index 0f046fa..37f1ad8 100644 --- a/lib/buxton2.c +++ b/lib/buxton2.c @@ -720,8 +720,11 @@ static int wait_msg(struct buxton_client *client, guint32 msgid) } /* poll or proc error */ - if (r == -1) + if (r == -1) { + g_hash_table_remove(client->req_cbs, + GUINT_TO_POINTER(msgid)); return -1; + } req = g_hash_table_lookup(client->req_cbs, GUINT_TO_POINTER(msgid)); @@ -736,6 +739,8 @@ static int wait_msg(struct buxton_client *client, guint32 msgid) bxt_err("wait response: timeout"); errno = ETIMEDOUT; + g_hash_table_remove(client->req_cbs, GUINT_TO_POINTER(msgid)); + return -1; }