Commit 68eb77e1 authored by Ghislain MARY's avatar Ghislain MARY

Fix DNS resolution on Windows by calling WSAStartup when creating the resolver...

Fix DNS resolution on Windows by calling WSAStartup when creating the resolver (this is needed so that gethostname() do not fail).
parent a28f40c3
......@@ -152,6 +152,7 @@ struct belle_sip_dual_resolver_context{
void belle_sip_resolver_context_init(belle_sip_resolver_context_t *obj, belle_sip_stack_t *stack){
obj->stack=stack;
belle_sip_init_sockets(); /* Need to be called for DNS resolution to work on Windows platform. */
}
static struct dns_resolv_conf *resconf(belle_sip_simple_resolver_context_t *ctx) {
......
......@@ -67,7 +67,6 @@ static unsigned int wait_for(belle_sip_stack_t *stack, int *current_value, int
static endpoint_t* create_endpoint() {
endpoint_t* endpoint;
if (belle_sip_init_sockets() < 0) return NULL;
endpoint = belle_sip_new0(endpoint_t);
endpoint->stack = belle_sip_stack_new(NULL);
return endpoint;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment