/*----- configuration options -----*/
static char *sitename, *feedfile;
+static const char *remote_host;
+static int quiet_multiple=0;
+
static int max_connections=10, max_queue_per_conn=200;
+
static int connection_setup_timeout=200, port=119, try_stream=1;
-static int inndcomm_flush_timeout=100, quiet_if_locked=0;
-static const char *remote_host;
+static int inndcomm_flush_timeout=100;
static int reconnect_delay_periods, flushfail_retry_periods, open_wait_periods;
static int backlog_retry_minperiods, backlog_spontaneous_rescan_periods;
static const char *inndconffile;
r= fcntl(lockfd, F_SETLK, &fl);
if (r==-1) {
if (errno==EACCES || errno==EAGAIN) {
- if (quiet_if_locked) exit(0);
+ if (quiet_multiple) exit(0);
fatal("another duct holds the lockfile");
}
sysdie("fcntl F_SETLK lockfile %s", path_lock);
}
static const Option options[]= {
+{'f',"feedfile", &feedfile, op_string },
+{'q',"quiet-multiple", &quiet_multiple, op_booltrue, 1 },
+
{ 0, "max-connections", &max_connections op_integer },
+{ 0, "max-queue-per-conn", &max_queue_per_conn op_integer },
+
+
{ 0, "streaming", &try_stream, op_booltrue, 1 },
{ 0, "no-streaming", &try_stream, op_boolfalse, 1 },
-{'h',"host", &remote_host, op_string },
{'P',"port", &port op_integer },
{ 0, "inndconf", &inndconffile, op_string },
-{'f',"feedfile", &feedfile, op_string },
-{'q',"quiet-multiple", &quiet_if_locked, op_booltrue, 1 },
-{ 0, "no-quiet-multiple", &quiet_if_locked, op_boolfalse, 1 },
{'d',"daemon", &become_daemon, op_booltrue, 1 },
{ 0, "no-daemon", &become_daemon, op_boolfalse, 1 },
{ 0, "no-check-proportion", &nocheck_thresh_pct, op_double },
{ 0, "no-check-filter", &nocheck_decay_articles, op_double },
-{ 0, "max-queue-size", &max_queue_per_conn op_integer },
{ 0, "reconnect-interval", &reconnect_delay_periods, op_periods_rndup },
{ 0, "flush-retry-interval", &flushfail_retry_periods, op_periods_rndup },
{ 0, "connection-timeout", &connection_timeout, op_seconds },
if (!arg) badusage("need site name argument");
sitename= arg;
- if ((arg= *++argv)) {
- if (remote_host) badusage("must not specify -h and also host as argument");
+ if ((arg= *++argv))
remote_host= arg;
- }
if (*++argv) badusage("too many non-option arguments");