From 9adca2783686f1de21bd05356c95dcc996fe34e4 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 4 May 2015 22:41:32 -0400 Subject: [PATCH] config migration endless typing meow --- citadel/config.c | 2 +- citadel/modules/spam/serv_spam.c | 12 +++--------- citadel/modules/xmpp/serv_xmpp.c | 2 +- citadel/modules/xmpp/xmpp_presence.c | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/citadel/config.c b/citadel/config.c index 4115f1b5a..846eb052f 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -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); diff --git a/citadel/modules/spam/serv_spam.c b/citadel/modules/spam/serv_spam.c index f9a823d9e..df7f97e77 100644 --- a/citadel/modules/spam/serv_spam.c +++ b/citadel/modules/spam/serv_spam.c @@ -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]; diff --git a/citadel/modules/xmpp/serv_xmpp.c b/citadel/modules/xmpp/serv_xmpp.c index 64dc8b7aa..36b1d33ce 100644 --- a/citadel/modules/xmpp/serv_xmpp.c +++ b/citadel/modules/xmpp/serv_xmpp.c @@ -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, diff --git a/citadel/modules/xmpp/xmpp_presence.c b/citadel/modules/xmpp/xmpp_presence.c index d716d4b1a..b36228e27 100644 --- a/citadel/modules/xmpp/xmpp_presence.c +++ b/citadel/modules/xmpp/xmpp_presence.c @@ -158,7 +158,7 @@ void xmpp_destroy_buddy(char *presence_jid, int aggressively) { ); cprintf(""); cprintf("", xmlesc(xmlbuf1, presence_jid, sizeof xmlbuf1)); - cprintf("%s", xmlesc(xmlbuf1, config.c_humannode, sizeof xmlbuf1)); + cprintf("%s", xmlesc(xmlbuf1, CtdlGetConfigStr("c_humannode"), sizeof xmlbuf1)); cprintf(""); cprintf("" "" -- 2.30.2