Back to index

citadel  8.12
Functions | Variables
modules_init.c File Reference
#include "sysdep.h"
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <libcitadel.h>
#include "citadel.h"
#include "modules_init.h"
#include "sysdep_decls.h"
#include "serv_extensions.h"

Go to the source code of this file.

Functions

void LogPrintMessages (long err)
void initialise_modules (int threading)

Variables

long DetailErrorFlags

Function Documentation

void initialise_modules ( int  threading)

Definition at line 25 of file modules_init.c.

{
    long filter;
    const char *pMod;

    if (threading) {
        MODM_syslog(LOG_DEBUG, "Initializing, CtdlThreads enabled.\n");
    }
    else {
        MODM_syslog(LOG_INFO, "Initializing. CtdlThreads not yet enabled.\n");
    }
/* static server initialization: */
        pMod = CTDL_INIT_CALL(citserver);
        MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);

        pMod = CTDL_INIT_CALL(control);
        MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);

        pMod = CTDL_INIT_CALL(euidindex);
        MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);

        pMod = CTDL_INIT_CALL(file_ops);
        MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);

        pMod = CTDL_INIT_CALL(msgbase);
        MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);

        pMod = CTDL_INIT_CALL(room_ops);
        MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);

        pMod = CTDL_INIT_CALL(user_ops);
        MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
/* dynamic modules: */

       pMod = CTDL_INIT_CALL(modules);
        MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);

       pMod = CTDL_INIT_CALL(autocompletion);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(bio);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(blog);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(c_ares_client);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(calendar);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(checkpoint);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(virus);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(dspam);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(event_client);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(expire);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(extnotify);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(fulltext);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(imap);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(inetcfg);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(instmsg);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(listsub);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(managesieve);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(migrate);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(mrtg);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(netconfig);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(netfilter);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(network_spool);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(network);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(network_client);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(newuser);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(notes);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(openid_rp);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(pop3);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(pop3client);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(roomchat);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(rssparser);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(rssclient);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(rwho);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(sieve);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(smtp);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(smtp_eventclient);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(smtp_queu);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(spam);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(test);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(urldeshortener);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(vcard);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(wiki);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);
       pMod = CTDL_INIT_CALL(xmpp);
       MOD_syslog(LOG_DEBUG, "Loaded module: %s\n", pMod);


       for (filter = 1; filter != 0; filter = filter << 1)
              if ((filter & DetailErrorFlags) != 0)
                     LogPrintMessages(filter);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void LogPrintMessages ( long  err)

Definition at line 239 of file serv_extensions.c.

{
       StrBuf *Message;
       StrBuf *List, *DetailList;
       ConstStr *Short, *Where, *Hint; 

       
       Message = NewStrBufPlain(NULL, 
                             StrLength(portlist) + StrLength(errormessages));
       
       DetailErrorFlags = DetailErrorFlags & ~err;

       switch (err)
       {
       case ERR_PORT:
              Short = &ErrPortShort;
              Where = &ErrPortWhere;
              Hint  = &ErrPortHint;
              List  = portlist;
              DetailList = errormessages;
              break;
       default:
              Short = &Empty;
              Where = &Empty;
              Hint  = &Empty;
              List  = NULL;
              DetailList = NULL;
       }

       StrBufAppendBufPlain(Message, CKEY(ErrGeneral[0]), 0);
       StrBufAppendBufPlain(Message, CKEY(*Short), 0);  
       StrBufAppendBufPlain(Message, CKEY(ErrGeneral[1]), 0);
       StrBufAppendBufPlain(Message, CKEY(*Where), 0);
       StrBufAppendBuf(Message, List, 0);
       StrBufAppendBufPlain(Message, HKEY("\n\n"), 0);
       StrBufAppendBufPlain(Message, CKEY(*Hint), 0);
       StrBufAppendBufPlain(Message, HKEY("\n\n"), 0);
       StrBufAppendBufPlain(Message, CKEY(ErrGeneral[2]), 0);
       StrBufAppendBuf(Message, DetailList, 0);
       StrBufAppendBufPlain(Message, HKEY("\n\n"), 0);
       StrBufAppendBufPlain(Message, CKEY(ErrGeneral[3]), 0);

       MOD_syslog(LOG_EMERG, "%s", ChrPtr(Message));
       MOD_syslog(LOG_EMERG, "%s", ErrSubject);
       quickie_message("Citadel", NULL, NULL, AIDEROOM, ChrPtr(Message), FMT_FIXED, ErrSubject);

       FreeStrBuf(&Message);
       FreeStrBuf(&List);
       FreeStrBuf(&DetailList);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 217 of file serv_extensions.c.