The domain list is created in the tcp_server_event function at connection time (G_IO_OUT event), so it is not necessary to create it here. --- src/dnsproxy.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 00c5eb3..bdb8f04 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -2319,7 +2319,6 @@ static gboolean tcp_listener_event(GIOChannel *channel, GIOCondition condition, unsigned char buf[768]; char query[512]; struct request_data *req; - struct server_data *server; int sk, client_sk, len, err; struct sockaddr_in6 client_addr; socklen_t client_addr_len = sizeof(client_addr); @@ -2387,26 +2386,14 @@ static gboolean tcp_listener_event(GIOChannel *channel, GIOCondition condition, for (list = server_list; list; list = list->next) { struct server_data *data = list->data; - GList *domains; if (data->protocol != IPPROTO_UDP || data->enabled == FALSE) continue; - server = create_server(data->interface, NULL, - data->server, IPPROTO_TCP); - if (server == NULL) + if (create_server(data->interface, NULL, + data->server, IPPROTO_TCP) == NULL) continue; - for (domains = data->domains; domains; - domains = domains->next) { - char *dom = domains->data; - - DBG("Adding domain %s to %s", dom, server->server); - - server->domains = g_list_append(server->domains, - g_strdup(dom)); - } - waiting_for_connect = TRUE; } -- 1.7.9.5 _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman