Browse Source

Add initialization of evdns.

master
Richard Nyberg 18 years ago
parent
commit
abe4001938
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      btpd/main.c

+ 8
- 2
btpd/main.c View File

@@ -2,13 +2,13 @@
#include <sys/file.h> #include <sys/file.h>
#include <sys/stat.h> #include <sys/stat.h>


#include <assert.h>
#include <err.h> #include <err.h>
#include <errno.h> #include <errno.h>
#include <event.h>
#include <evdns.h>
#include <fcntl.h> #include <fcntl.h>
#include <getopt.h> #include <getopt.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>


@@ -216,6 +216,12 @@ args_done:


event_init(); event_init();


if ((errno = evdns_resolv_conf_parse(DNS_OPTION_NAMESERVERS,
"/etc/resolv.conf")) != 0) {
btpd_log(BTPD_L_ERROR,
"failed to setup dns from /etc/resolv.conf (%d).\n", errno);
}

btpd_init(); btpd_init();


event_dispatch(); event_dispatch();


Loading…
Cancel
Save