From b509adcc1a0a86366783e6e83ae7138364084213 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Wed, 10 Nov 2010 11:58:33 +0100 Subject: [PATCH] dnsproxy: Remove TCP connection lookup from create_server() The TCP connections are opened and closed for each DNS over TCP request, no need to try to find an already opened one. --- plugins/dnsproxy.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/plugins/dnsproxy.c b/plugins/dnsproxy.c index 1c4a9e8..448c7a5 100644 --- a/plugins/dnsproxy.c +++ b/plugins/dnsproxy.c @@ -634,16 +634,6 @@ static struct server_data *create_server(const char *interface, return NULL; } - data = find_server(interface, domain, server, protocol); - if (data) { - if (data->watch > 0) - g_source_remove(data->watch); - data->watch = g_io_add_watch(data->channel, - G_IO_OUT | G_IO_IN | G_IO_HUP | G_IO_NVAL | G_IO_ERR, - tcp_server_event, data); - return data; - } - sk = socket(AF_INET, type, protocol); if (sk < 0) { connman_error("Failed to create server %s socket", server); -- 2.7.4