#include "conf.h"
#include "connection.h"
+#include "list.h"
#include "logger.h"
#include "meta.h"
#include "net.h"
unsigned long arg = 1;
if(ioctlsocket(c->socket, FIONBIO, &arg) != 0) {
- logger(DEBUG_ALWAYS, LOG_ERR, "ioctlsocket for %s: %d", c->hostname, sockstrerror(sockerrno));
+ logger(DEBUG_ALWAYS, LOG_ERR, "ioctlsocket for %s: %s", c->hostname, sockstrerror(sockerrno));
}
#endif
event_set(&c->inevent, c->socket, EV_READ | EV_PERSIST, handle_meta_connection_data, c);
event_set(&c->outevent, c->socket, EV_WRITE | EV_PERSIST, handle_meta_write, c);
event_add(&c->inevent, NULL);
-
+
configure_tcp(c);
connection_add(c);
if(outgoing->ai)
freeaddrinfo(outgoing->ai);
+ if(outgoing->config_tree)
+ exit_configuration(&outgoing->config_tree);
+
if(outgoing->name)
free(outgoing->name);