qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: zhiyong.wu@ucloud.cn
To: qemu-devel@nongnu.org
Cc: Zhi Yong Wu <zhiyong.wu@ucloud.cn>
Subject: [Qemu-devel] [PATCH] COLO: remove the operation to clear connection list
Date: Tue, 24 Oct 2017 03:26:28 +0800	[thread overview]
Message-ID: <1508786788-32557-1-git-send-email-zhiyong.wu@ucloud.cn> (raw)

From: Zhi Yong Wu <zhiyong.wu@ucloud.cn>

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

             reply	other threads:[~2017-10-23 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 19:26 zhiyong.wu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-10-23 19:29 [Qemu-devel] [PATCH] COLO: remove the operation to clear connection list Zhi Yong Wu
2017-10-23 19:27 zhiyong.wu
2017-10-23 11:25 ` Darren Kenny
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=1508786788-32557-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).