From: Zhi Yong Wu <zhiyong.wu@ucloud.cn>
To: qemu-devel@nongnu.org
Cc: zhiyong.wu@ucloud.cn
Subject: [Qemu-devel] [PATCH] COLO: remove the operation to clear connection list
Date: Tue, 24 Oct 2017 03:29:54 +0800 [thread overview]
Message-ID: <1508786994-32643-1-git-send-email-zhiyong.wu@ucloud.cn> (raw)
When hash table is created with g_hash_table_new_full(),
the free function has been registered. So it isn't necessary
since g_hash_table_remove_all() will call connection_destroy()
for each connection struct automatically.
Signed-off-by: Zhi Yong Wu <zhiyong.wu@ucloud.cn>
---
net/colo.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/net/colo.c b/net/colo.c
index 28ce7c8..668abb7 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -197,12 +197,6 @@ Connection *connection_get(GHashTable *connection_track_table,
trace_colo_proxy_main("colo proxy connection hashtable full,"
" clear it");
connection_hashtable_reset(connection_track_table);
- /*
- * clear the conn_list
- */
- while (!g_queue_is_empty(conn_list)) {
- connection_destroy(g_queue_pop_head(conn_list));
- }
}
g_hash_table_insert(connection_track_table, new_key, conn);
--
1.7.1
next reply other threads:[~2017-10-23 10:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 19:29 Zhi Yong Wu [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-10-23 19:27 [Qemu-devel] [PATCH] COLO: remove the operation to clear connection list zhiyong.wu
2017-10-23 11:25 ` Darren Kenny
2017-10-23 19:26 zhiyong.wu
2017-10-23 10:40 Zhi Yong Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508786994-32643-1-git-send-email-zhiyong.wu@ucloud.cn \
--to=zhiyong.wu@ucloud.cn \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).