Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 254966 | Differences between
and this patch

Collapse All | Expand All

(-)c-ares-1.6.0/ares.h (+9 lines)
Lines 218-223 Link Here
218
  int nsort;
218
  int nsort;
219
};
219
};
220
220
221
struct ares_config_info {
222
       int timeout;
223
       int tries;
224
       int numservers;
225
       char **servers;
226
};
227
221
struct hostent;
228
struct hostent;
222
struct timeval;
229
struct timeval;
223
struct sockaddr;
230
struct sockaddr;
Lines 314-319 Link Here
314
void ares_free_hostent(struct hostent *host);
321
void ares_free_hostent(struct hostent *host);
315
const char *ares_strerror(int code);
322
const char *ares_strerror(int code);
316
323
324
int ares_get_config(struct ares_config_info *d, ares_channel c);
325
317
#ifdef  __cplusplus
326
#ifdef  __cplusplus
318
}
327
}
319
#endif
328
#endif
(-)c-ares-1.6.0/ares_init.c (+21 lines)
Lines 1562-1564 Link Here
1562
  channel->sock_create_cb = cb;
1562
  channel->sock_create_cb = cb;
1563
  channel->sock_create_cb_data = data;
1563
  channel->sock_create_cb_data = data;
1564
}
1564
}
1565
1566
int ares_get_config(struct ares_config_info *d, ares_channel c)
1567
{
1568
       int i;
1569
       char *p;
1570
1571
       memset(d, 0, sizeof(struct ares_config_info));
1572
1573
       d->timeout = c->timeout;
1574
       d->tries = c->tries;
1575
       d->numservers = c->nservers;
1576
       d->servers = calloc(sizeof(char *), c->nservers);
1577
1578
       for (i = 0; i < c->nservers; i++)
1579
       {
1580
               p = inet_ntoa(c->servers[i].addr);
1581
               d->servers[i] = p ? strdup(p) : NULL;
1582
       }
1583
1584
       return ARES_SUCCESS;
1585
}

Return to bug 254966