Commit 1fd910a9 authored by Simon Morlat's avatar Simon Morlat
Browse files

Adapt resolve.c test program to new resolver API.

parent 5218bcd6
......@@ -22,23 +22,21 @@
static belle_sip_stack_t *stack;
static void resolver_callback(void *data, const char *queried_name, struct addrinfo *ai_list, unsigned int ttl){
static void resolver_callback(void *data, belle_sip_resolver_results_t *results){
int err;
struct addrinfo *ai_it;
const struct addrinfo *ai_it;
char name[NI_MAXHOST];
char port[NI_MAXSERV];
const struct addrinfo *ai_list = belle_sip_resolver_results_get_addrinfos(results);
if (err!=0){
fprintf(stderr,"getnameinfo error: %s",gai_strerror(err));
printf("\t%s %s (ttl:%u)\n",name,port,ttl);
printf("\t%s %s (ttl:%u)\n",name,port,belle_sip_resolver_results_get_ttl(results));
if (ai_list){
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