From 3b3bdf72d49acb96bd181287249bf346cc782f7a Mon Sep 17 00:00:00 2001 From: thorkill Date: Wed, 25 May 2016 22:42:48 +0200 Subject: [PATCH] Initialize outoging->config_tree --- src/net_socket.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/net_socket.c b/src/net_socket.c index 1ee31330..094e2668 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -605,12 +605,15 @@ void setup_outgoing_connection(outgoing_t *outgoing) { } } + if (!outgoing->config_tree) { + init_configuration(&outgoing->config_tree); + read_host_config(outgoing->config_tree, outgoing->name); + } + // Prefer the address discovered via SLPD if (slpdinterval && n->slpd_address) outgoing->cfg = n->slpd_address; - else if (!outgoing->config_tree) { - init_configuration(&outgoing->config_tree); - read_host_config(outgoing->config_tree, outgoing->name); + else { char *address, *port; if(!get_config_string(lookup_config(outgoing->config_tree, "Port"), &port))