void load_timeouts(void) { struct aclmember *entry = NULL; while (getaclentry("timeout", &entry)) { if ((ARG0 != NULL) && (ARG1 != NULL)) { unsigned long value = strtoul(ARG1, NULL, 0); if (strcasecmp(ARG0, "rfc931") == 0) timeout_rfc931 = value; else if (value > 0) if (strcasecmp(ARG0, "idle") == 0) { timeout_idle = value; if (timeout_maxidle < timeout_idle) timeout_maxidle = timeout_idle; } else if (strcasecmp(ARG0, "maxidle") == 0) { timeout_maxidle = value; if (timeout_idle > timeout_maxidle) timeout_idle = timeout_maxidle; } else if (strcasecmp(ARG0, "data") == 0) timeout_data = value; else if (strcasecmp(ARG0, "accept") == 0) timeout_accept = value; else if (strcasecmp(ARG0, "connect") == 0) timeout_connect = value; } } }
void get_xferlog_format(void) { int which; struct aclmember *entry = (struct aclmember *)NULL; /* xferlog format <formatstring> */ xferlog_format[0] = '\0'; while (getaclentry("xferlog", &entry)) { if (ARG0 && (strcasecmp(ARG0, "format") == 0)) { for (which = 1; (which < MAXARGS) && ARG[which]; which++) { if (which > 1) { if (strlcat(xferlog_format, " ", sizeof(xferlog_format)) >= sizeof(xferlog_format)) break; } if (strlcat(xferlog_format, ARG[which], sizeof(xferlog_format)) >= sizeof(xferlog_format)) break; } break; } } /* default xferlog format */ if (xferlog_format[0] == '\0') (void) strlcpy(xferlog_format, DEFXFERFORMAT, sizeof(xferlog_format)); }