chiark / gitweb /
site: Remove "wishful thinking" from transport address handling comment
[secnet.git] / site.c
diff --git a/site.c b/site.c
index ecb45bf150b58bf10b15aa9ef08b59eb3e3b90bf..d3eb662a144d0c6b0b23b821b4fa79554711d50b 100644 (file)
--- a/site.c
+++ b/site.c
@@ -40,7 +40,6 @@
 #define DEFAULT_MOBILE_WAIT_TIME                (10*1000) /* [ms] */
 
 #define DEFAULT_MOBILE_PEER_EXPIRY            (2*60)      /* [s] */
-#define DEFAULT_PEERS_MAX 3 /* send at most this many copies (default) */
 
 /* Each site can be in one of several possible states. */
 
@@ -144,9 +143,6 @@ static struct flagstr log_event_table[]={
 
 /* Details of "mobile peer" semantics:
 
- | Note: this comment is wishful thinking right now.  It will be
- | implemented in subsequent commits.
-
    - We use the same data structure for the different configurations,
      but manage it with different algorithms.
    
@@ -1968,7 +1964,7 @@ static list_t *site_apply(closure_t *self, struct cloc loc, dict_t *context,
     const char *peerskey= st->peer_mobile
        ? "mobile-peers-max" : "static-peers-max";
     st->transport_peers_max= dict_read_number(
-       dict,peerskey,False,"site",loc,DEFAULT_PEERS_MAX);
+       dict,peerskey,False,"site",loc, st->address ? 4 : 3);
     if (st->transport_peers_max<1 ||
        st->transport_peers_max>MAX_PEER_ADDRS) {
        cfgfatal(loc,"site", "%s must be in range 1.."