summaryrefslogtreecommitdiff
path: root/src/dnsdoe.c
blob: 579eb0489164fed55245585abc96260ae7baefa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <unistd.h>

#include "buffer.h"
#include "dnsresolv.h"
#include "exit.h"

#include "dns.h"

void dnsdoe(int r)
{
  switch (r) {
    case DNS_HARD: buffer_putsflush(buffer_2, "hard error\n"); _exit(100);
    case DNS_SOFT: buffer_putsflush(buffer_2, "soft error\n"); _exit(111);
    case DNS_MEM:  buffer_putsflush(buffer_2, "out of memory\n"); _exit(111);
  }
}