chiark / gitweb /
Knock address specifications into order.
authorRichard Kettlewell <rjk@greenend.org.uk>
Wed, 26 Sep 2007 13:20:18 +0000 (14:20 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Wed, 26 Sep 2007 13:20:18 +0000 (14:20 +0100)
- connect, broadcast and broadcast_from now require an address and a port.
- listen now requires only a port (but you can specify an address).

doc/disorder_config.5.in
lib/configuration.c

index 0cbd76a4abef3b278d6492ef67c0944f54404130..dd9c580e2fa918b259c1476d7ea7dfa6157fcb18 100644 (file)
@@ -405,10 +405,9 @@ Specifies one or more stopwords that should not take part in searches
 over track names.
 .SS "Client Configuration"
 .TP
-.B connect \fR[\fIHOST\fR] \fISERVICE\fR
+.B connect \fIHOST SERVICE\fR
 Connect to the address specified by \fIHOST\fR and port specified by
-\fISERVICE\fR.  If \fIHOST\fR is omitted then connects to the local host.
-Normally the UNIX domain socket is used instead.
+\fISERVICE\fR.
 .SS "Web Interface Configuration"
 .TP
 .B refresh \fISECONDS\fR
index 062751419189e5bc63624784924af3886499759e..47ba9f4c68d4fd29a18f83a69438b3e886ef4c3a 100644 (file)
@@ -794,7 +794,7 @@ static int validate_addrport(const struct config_state attribute((unused)) *cs,
   }
 }
 
-static int validate_address(const struct config_state attribute((unused)) *cs,
+static int validate_port(const struct config_state attribute((unused)) *cs,
                         int nvec,
                         char attribute((unused)) **vec) {
   switch(nvec) {
@@ -806,7 +806,7 @@ static int validate_address(const struct config_state attribute((unused)) *cs,
   case 2:
     return 0;
   default:
-    error(0, "%s:%d: expected ADDRESS PORT",
+    error(0, "%s:%d: expected [ADDRESS] PORT",
          cs->path, cs->line);
     return -1;
   }
@@ -822,7 +822,7 @@ static const struct conf conf[] = {
   { C(alias),            &type_string,           validate_alias },
   { C(allow),            &type_stringlist_accum, validate_allow },
   { C(broadcast),        &type_stringlist,       validate_addrport },
-  { C(broadcast_from),   &type_stringlist,       validate_address },
+  { C(broadcast_from),   &type_stringlist,       validate_addrport },
   { C(channel),          &type_string,           validate_channel },
   { C(checkpoint_kbyte), &type_integer,          validate_non_negative },
   { C(checkpoint_min),   &type_integer,          validate_non_negative },
@@ -832,7 +832,7 @@ static const struct conf conf[] = {
   { C(gap),              &type_integer,          validate_non_negative },
   { C(history),          &type_integer,          validate_positive },
   { C(home),             &type_string,           validate_isdir },
-  { C(listen),           &type_stringlist,       validate_addrport },
+  { C(listen),           &type_stringlist,       validate_port },
   { C(lock),             &type_boolean,          validate_any },
   { C(mixer),            &type_string,           validate_ischr },
   { C(multicast_ttl),    &type_integer,          validate_non_negative },