Added config.c_nntp_port to server and to conf protocol, but not to client
authorArt Cancro <ajc@uncensored.citadel.org>
Mon, 3 Mar 2014 16:26:20 +0000 (11:26 -0500)
committerArt Cancro <ajc@uncensored.citadel.org>
Mon, 3 Mar 2014 16:26:20 +0000 (11:26 -0500)
citadel/config.c
citadel/control.c
citadel/include/ctdl_module.h
citadel/modules/migrate/serv_migrate.c
citadel/utils/setup.c

index 3d6527f38db4a8e50970d706cc8124d0d05727d7..5aee1d72a42782073bef40e060648709db8dd09e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Read and write the citadel.config file
  *
- * Copyright (c) 1987-2012 by the citadel.org team
+ * Copyright (c) 1987-2014 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -91,6 +91,7 @@ void brand_new_installation_set_defaults(void) {
        config.c_managesieve_port = 2020;
        config.c_xmpp_c2s_port = 5222;
        config.c_xmpp_s2s_port = 5269;
+       config.c_nntp_port = 119;
 }
 
 void setcfglen(void)
index f543e8d4382acd29c845b5adb82a3aaf8ca5b9cc..0bc49456ec9722722f507099fc9a75cec67c5e7c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This module handles states which are global to the entire server.
  *
- * Copyright (c) 1987-2012 by the citadel.org team
+ * Copyright (c) 1987-2014 by the citadel.org team
  *
  *  This program is open source software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 3.
@@ -387,6 +387,7 @@ void cmd_conf(char *argbuf)
                cprintf("%d\n", config.c_guest_logins);
                cprintf("%d\n", config.c_port_number);
                cprintf("%d\n", config.c_ctdluid);
+               cprintf("%d\n", config.c_nntp_port);
                cprintf("000\n");
        }
 
@@ -657,6 +658,9 @@ void cmd_conf(char *argbuf)
                        case 69:
                                config.c_ctdluid = atoi(buf);
                                break;
+                       case 70:
+                               config.c_nntp_port = atoi(buf);
+                               break;
                        }
                        ++a;
                }
index 7a8b5250da83f64edd1d8e1f535bd422a002be4e..36c48bbf3657dd8613ae1fc2ab525f880e7c1e53 100644 (file)
@@ -384,6 +384,7 @@ struct config {
        time_t c_pop3_fastest;
        int c_spam_flag_only;
        int c_guest_logins;
+       int c_nntp_port;
 };
 struct configlen {
        long c_nodename;
index f4c8ef7b34dab9da555244fd40354a7f14b2431c..2005864a1f03f6ba4367a05098df5ddfb408f800 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This module dumps and/or loads the Citadel database in XML format.
  *
- * Copyright (c) 1987-2012 by the citadel.org team
+ * Copyright (c) 1987-2014 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -464,6 +464,7 @@ void migr_do_export(void) {
        cprintf("<c_pop3_fetch>%ld</c_pop3_fetch>\n", config.c_pop3_fetch);
        cprintf("<c_pop3_fastest>%ld</c_pop3_fastest>\n", config.c_pop3_fastest);
        cprintf("<c_spam_flag_only>%d</c_spam_flag_only>\n", config.c_spam_flag_only);
+       cprintf("<c_nntp_port>%d</c_nntp_port>\n", config.c_nntp_port);
        client_write("</config>\n", 10);
        
        /* Export the control file */
@@ -642,6 +643,7 @@ int migr_config(void *data, const char *el)
        else if (!strcasecmp(el, "c_pop3_fetch"))               config.c_pop3_fetch = atol(ChrPtr(migr_chardata));
        else if (!strcasecmp(el, "c_pop3_fastest"))             config.c_pop3_fastest = atol(ChrPtr(migr_chardata));
        else if (!strcasecmp(el, "c_spam_flag_only"))           config.c_spam_flag_only = atoi(ChrPtr(migr_chardata));
+       else if (!strcasecmp(el, "c_nntp_port"))                config.c_nntp_port = atoi(ChrPtr(migr_chardata));
        else return 0;
        return 1; /* Found above...*/
 }
index 41bed61326e04ca56a3fa92086606bd889c3ad41..539876b26bad12791e2584d39d4b65c6763c2b85 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Citadel setup utility
  *
- * Copyright (c) 1987-2012 by the citadel.org team
+ * Copyright (c) 1987-2014 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version 3.
@@ -1147,6 +1147,7 @@ void set_default_values(void)
        GetDefaultVALINT(c_managesieve_port, 2020);
        GetDefaultVALINT(c_xmpp_c2s_port, 5222);
        GetDefaultVALINT(c_xmpp_s2s_port, 5269);
+       GetDefaultVALINT(c_nntp_port, 119);
 #endif
 }