Ticket #9390: 0008-Check-for-public-relay-added.patch

File 0008-Check-for-public-relay-added.patch, 838 bytes (added by aruna1234, 2 years ago)
  • src/common/compat.c

    From ee64e1f7d2f1470469c62460d820e521d9cd4051 Mon Sep 17 00:00:00 2001
    From: ArunaMaurya221B <aruna.maurya12@gmail.com>
    Date: Tue, 19 Dec 2017 18:07:49 +0530
    Subject: [PATCH 8/8] Check for public relay added
    
    ---
     src/common/compat.c | 8 ++++++--
     1 file changed, 6 insertions(+), 2 deletions(-)
    
    diff --git a/src/common/compat.c b/src/common/compat.c
    index 38693b2..dbe9918 100644
    a b get_max_sockets(void) 
    16831683int
    16841684set_max_file_descriptors(rlim_t limit, int *max_out)
    16851685{
    1686   if (limit < ULIMIT_BUFFER) {
    1687     log_warn(LD_CONFIG,
     1686  if(public_server_mode(get_options())) {
     1687    if(limit < ULIMIT_BUFFER) {
     1688      log_warn(LD_CONFIG,
    16881689             "ConnLimit must be at least %d. Failing.", ULIMIT_BUFFER);
     1690      return -1;
     1691    }
     1692  }
    16891693    return -1;
    16901694  }
    16911695