Initialize outoging->config_tree

This commit is contained in:
thorkill 2016-05-25 22:42:48 +02:00
parent dbddbc2dd7
commit 3b3bdf72d4

View file

@ -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 // Prefer the address discovered via SLPD
if (slpdinterval && n->slpd_address) if (slpdinterval && n->slpd_address)
outgoing->cfg = n->slpd_address; outgoing->cfg = n->slpd_address;
else if (!outgoing->config_tree) { else {
init_configuration(&outgoing->config_tree);
read_host_config(outgoing->config_tree, outgoing->name);
char *address, *port; char *address, *port;
if(!get_config_string(lookup_config(outgoing->config_tree, "Port"), &port)) if(!get_config_string(lookup_config(outgoing->config_tree, "Port"), &port))