citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

config.c File Reference
#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <netdb.h>
#include <sys/utsname.h>
#include <libcitadel.h>
#include <assert.h>
#include "config.h"
#include "ctdl_module.h"
Include dependency graph for config.c:

Go to the source code of this file.

Functions

void config_warn_if_port_unset (char *key, int default_port)
 
void config_warn_if_empty (char *key)
 
void validate_config (void)
 
void brand_new_installation_set_defaults (void)
 
void migrate_legacy_config (struct legacy_config *lconfig)
 
void initialize_config_system (void)
 
void shutdown_config_system (void)
 
void CtdlSetConfigStr (char *key, char *value)
 
void CtdlSetConfigLong (char *key, long value)
 
void CtdlSetConfigInt (char *key, int value)
 
void CtdlDelConfig (char *key)
 
char * CtdlGetConfigStr (char *key)
 
int CtdlGetConfigInt (char *key)
 
long CtdlGetConfigLong (char *key)
 
void CtdlGetSysConfigBackend (long msgnum, void *userdata)
 
char * CtdlGetSysConfig (char *sysconfname)
 
void CtdlPutSysConfig (char *sysconfname, char *sysconfdata)
 

Variables

long config_msgnum = 0
 
HashList * ctdlconfig = NULL
 

Function Documentation

◆ brand_new_installation_set_defaults()

void brand_new_installation_set_defaults ( void  )

◆ config_warn_if_empty()

void config_warn_if_empty ( char *  key)

Definition at line 36 of file config.c.

References CtdlGetConfigStr().

Referenced by validate_config().

◆ config_warn_if_port_unset()

void config_warn_if_port_unset ( char *  key,
int  default_port 
)

Definition at line 25 of file config.c.

References CtdlGetConfigInt(), and CtdlSetConfigInt().

Referenced by validate_config().

◆ CtdlDelConfig()

void CtdlDelConfig ( char *  key)

Definition at line 370 of file config.c.

References CDB_CONFIG, cdb_delete(), and ctdlconfig.

Referenced by CtdlDeleteRoom().

◆ CtdlGetConfigInt()

◆ CtdlGetConfigLong()

◆ CtdlGetConfigStr()

◆ CtdlGetSysConfig()

◆ CtdlGetSysConfigBackend()

void CtdlGetSysConfigBackend ( long  msgnum,
void *  userdata 
)

Definition at line 444 of file config.c.

References config_msgnum.

Referenced by CtdlGetSysConfig().

◆ CtdlPutSysConfig()

void CtdlPutSysConfig ( char *  sysconfname,
char *  sysconfdata 
)

◆ CtdlSetConfigInt()

◆ CtdlSetConfigLong()

◆ CtdlSetConfigStr()

◆ initialize_config_system()

◆ migrate_legacy_config()

void migrate_legacy_config ( struct legacy_config lconfig)

Definition at line 142 of file config.c.

References legacy_config::c_aide_zap, legacy_config::c_aideroom, legacy_config::c_allow_spoofing, legacy_config::c_auth_mode, legacy_config::c_auto_cull, legacy_config::c_baseroom, legacy_config::c_creataide, legacy_config::c_createax, legacy_config::c_default_cal_zone, legacy_config::c_disable_newu, legacy_config::c_enable_fulltext, legacy_config::c_ep, legacy_config::c_fqdn, legacy_config::c_guest_logins, legacy_config::c_humannode, legacy_config::c_imap_keep_from, legacy_config::c_imap_port, legacy_config::c_imaps_port, legacy_config::c_initax, legacy_config::c_ip_addr, legacy_config::c_journal_dest, legacy_config::c_journal_email, legacy_config::c_journal_pubmsgs, legacy_config::c_ldap_base_dn, legacy_config::c_ldap_bind_dn, legacy_config::c_ldap_bind_pw, legacy_config::c_ldap_host, legacy_config::c_ldap_port, legacy_config::c_logpages, legacy_config::c_max_workers, legacy_config::c_maxmsglen, legacy_config::c_maxsessions, legacy_config::c_mbxep, legacy_config::c_min_workers, legacy_config::c_moreprompt, legacy_config::c_msa_port, legacy_config::c_net_freq, legacy_config::c_nntp_port, legacy_config::c_nntps_port, legacy_config::c_nodename, legacy_config::c_pager_program, legacy_config::c_pftcpdict_port, legacy_config::c_pop3_fastest, legacy_config::c_pop3_fetch, legacy_config::c_pop3_port, legacy_config::c_pop3s_port, legacy_config::c_port_number, legacy_config::c_purge_hour, legacy_config::c_rbl_at_greeting, legacy_config::c_regiscall, legacy_config::c_restrict, legacy_config::c_rfc822_strict_from, legacy_config::c_roompurge, legacy_config::c_site_location, legacy_config::c_sleeping, legacy_config::c_smtp_port, legacy_config::c_smtps_port, legacy_config::c_spam_flag_only, legacy_config::c_sysadm, legacy_config::c_twitdetect, legacy_config::c_twitroom, legacy_config::c_userpurge, legacy_config::c_xmpp_c2s_port, legacy_config::c_xmpp_s2s_port, CtdlSetConfigInt(), CtdlSetConfigLong(), CtdlSetConfigStr(), ExpirePolicy::expire_mode, and ExpirePolicy::expire_value.

Referenced by initialize_config_system().

◆ shutdown_config_system()

void shutdown_config_system ( void  )

Definition at line 317 of file config.c.

References ctdlconfig.

Referenced by master_cleanup().

◆ validate_config()

void validate_config ( void  )

Definition at line 45 of file config.c.

References config_warn_if_empty(), config_warn_if_port_unset(), and ctdluid.

Referenced by master_startup().

Variable Documentation

◆ config_msgnum

long config_msgnum = 0

Definition at line 21 of file config.c.

Referenced by CtdlGetSysConfig(), and CtdlGetSysConfigBackend().

◆ ctdlconfig

HashList* ctdlconfig = NULL