1092. [bug] libbind: get*by*() failed to check if res_init() had

been called.
This commit is contained in:
Mark Andrews 2001-11-01 04:03:40 +00:00
parent 6bad645917
commit 769cd7d5dd
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,6 @@
1092. [bug] libbind: get*by*() failed to check if res_init() had
been called.
1091. [bug] libbind: misplaced va_end().
1090. [bug] libbind: dns_ho.c:add_hostent() was not returning

View file

@ -16,7 +16,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
static const char rcsid[] = "$Id: irs_data.c,v 1.3 2001/07/04 08:10:23 marka Exp $";
static const char rcsid[] = "$Id: irs_data.c,v 1.4 2001/11/01 04:03:40 marka Exp $";
#endif
#include "port_before.h"
@ -153,7 +153,8 @@ net_data_create(const char *conf_file) {
if (net_data->res == NULL)
return (NULL);
if (res_ninit(net_data->res) == -1)
if ((net_data->res->options & RES_INIT) == 0 &&
res_ninit(net_data->res) == -1)
return (NULL);
return (net_data);