PRINT_IF_ERROR(ret, "vine_service_get_port");
__connect_to_server(session, info->use_tls, info->use_psk, ip, address_family, port);
+ vine_service_destroy(service);
free(info);
}
}
printf("\n");
fflush(stdout);
- ret = vine_session_set_ip_resolved_cb(session, service, __ip_resolved_cb, user_data);
+ vine_service_h s;
+ vine_service_clone(service, &s);
+ ret = vine_session_set_ip_resolved_cb(session, s, __ip_resolved_cb, user_data);
PRINT_IF_ERROR(ret, "vine_session_set_ip_resolved_cb");
}