chiark / gitweb /
more manpage, remove -h option
[inn-innduct.git] / backends / innduct.c
index f7300a30c4fe0a47e68971d182965b0f91345ba8..7fa943d638c4852364c0bc5bef3b9a7608b4b9c3 100644 (file)
@@ -160,10 +160,13 @@ perl -ne 'print if m/-8\<-/..m/-\>8-/; print "\f" if m/-\^L-/' backends/innduct.
 /*----- 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;
@@ -1604,7 +1607,7 @@ static void statemc_init(void) {
     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);
@@ -2261,22 +2264,23 @@ void op_periods_boolfalse(const Option *o, const char *val) {
 }
 
 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          },
@@ -2336,10 +2340,8 @@ int main(int argc, char **argv) {
   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");