15static int flagmrh = 0;
16static stralloc rh = {0};
27 fdmrh = open_read(
"control/morercpthosts.cdb");
28 if (fdmrh == -1)
if (errno != ENOENT)
return flagmrh = -1;
29 if (fdmrh > 0) flagmrh = 1;
33static stralloc
host = {0};
42 j = byte_rchr(
buf,len,
'@');
43 if (
j >= len)
return 1;
47 if (!stralloc_copyb(&
host,
buf,len))
return -1;
51 for (
j = 0;
j < len; ++
j)
52 if (!
j || (
buf[
j] ==
'.'))
56 fdmrh = open_read(
"control/morercpthosts.cdb");
57 if (fdmrh == -1)
if (errno == ENOENT)
return 0;
60 for (
j = 0;
j < len ;++
j)
61 if (!
j || (
buf[
j] ==
'.')) {
63 if (r) { cdb_free(&
cdb); close(fdmrh);
return r; }
int constmap_init(struct constmap *cm, char *s, int len, int flagcolon)
int control_readfile(stralloc *sa, char *fn, int flagme)
int rcpthosts(char *buf, int len)