config migration endless typing meow
authorArt Cancro <ajc@uncensored.citadel.org>
Tue, 5 May 2015 02:41:32 +0000 (22:41 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Tue, 5 May 2015 02:41:32 +0000 (22:41 -0400)
citadel/config.c
citadel/modules/spam/serv_spam.c
citadel/modules/xmpp/serv_xmpp.c
citadel/modules/xmpp/xmpp_presence.c

index 4115f1b5af83ff6f3b8934dfd514f2ccc3c761b3..846eb052f99d5424282c0440913d82e233dc71fd 100644 (file)
@@ -296,7 +296,7 @@ void initialize_config_system(void) {
 
        /* Only allow LDAP auth mode if we actually have LDAP support */
 #ifndef HAVE_LDAP
-       if ((config.c_auth_mode == AUTHMODE_LDAP) || (config.c_auth_mode == AUTHMODE_LDAP_AD)) {
+       if ((CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP) || (CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP_AD)) {
                fprintf(stderr, "Your system is configured for LDAP authentication,\n"
                                "but you are running a server built without OpenLDAP support.\n");
                exit(CTDL_EXIT_UNSUP_AUTH);
index f9a823d9ed5466994f25500ba924fd253effa8e6..df7f97e77d9a92f96f2c5e35d76218b343dc767d 100644 (file)
@@ -4,21 +4,15 @@
  * http://www.spamassassin.org (the SpamAssassin project is not in any way
  * affiliated with the Citadel project).
  *
- * Copyright (c) 1998-2012 by the citadel.org team
+ * Copyright (c) 1998-2015 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.
- * 
- * 
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * 
- * 
- * 
  */
 
 #define SPAMASSASSIN_PORT       "783"
@@ -141,8 +135,8 @@ int spam_assassin(struct CtdlMessage *msg, recptypes *recp) {
                 goto bail;
         }
         syslog(LOG_DEBUG, "<%s\n", buf);
-        syslog(LOG_DEBUG, "c_spam_flag_only setting %d\n", config.c_spam_flag_only);
-        if (config.c_spam_flag_only) {
+        syslog(LOG_DEBUG, "c_spam_flag_only setting %d\n", CtdlGetConfigInt("c_spam_flag_only"));
+        if (CtdlGetConfigInt("c_spam_flag_only")) {
                int headerlen;
                char *cur;
                char sastatus[10];
index 64dc8b7aa2f4e723a1d8a75be85e536506a546b1..36b1d33ce998be92d06b708a6272cbaac6f13954 100644 (file)
@@ -668,7 +668,7 @@ extern void xmpp_cleanup_events(void);
 CTDL_MODULE_INIT(xmpp)
 {
        if (!threading) {
-               CtdlRegisterServiceHook(config.c_xmpp_c2s_port,
+               CtdlRegisterServiceHook(CtdlGetConfigInt("c_xmpp_c2s_port"),
                                        NULL,
                                        xmpp_greeting,
                                        xmpp_command_loop,
index d716d4b1a3b39b9bd4f35e3be040653dd51e23c9..b36228e273791b158af6a14be93ad96d5f305fc2 100644 (file)
@@ -158,7 +158,7 @@ void xmpp_destroy_buddy(char *presence_jid, int aggressively) {
        );
        cprintf("<query xmlns=\"jabber:iq:roster\">");
        cprintf("<item jid=\"%s\" subscription=\"remove\">", xmlesc(xmlbuf1, presence_jid, sizeof xmlbuf1));
-       cprintf("<group>%s</group>", xmlesc(xmlbuf1, config.c_humannode, sizeof xmlbuf1));
+       cprintf("<group>%s</group>", xmlesc(xmlbuf1, CtdlGetConfigStr("c_humannode"), sizeof xmlbuf1));
        cprintf("</item>");
        cprintf("</query>"
                "</iq>"