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)  

context.c File Reference
#include "ctdl_module.h"
#include "serv_extensions.h"
#include "citserver.h"
#include "user_ops.h"
#include "locate_host.h"
#include "context.h"
#include "control.h"
#include "config.h"
Include dependency graph for context.c:

Go to the source code of this file.


int CtdlTrySingleUser (void)
void CtdlEndSingleUser (void)
int CtdlWantSingleUser (void)
int CtdlIsSingleUser (void)
int CtdlTerminateOtherSession (int session_num)
void BumpNewMailCounter (long which_user)
void CtdlBumpNewMailCounter (long which_user)
int CtdlIsUserLoggedIn (char *user_name)
int CtdlIsUserLoggedInByNum (long usernum)
CitContextMyContext (void)
void terminate_idle_sessions (void)
void terminate_all_sessions (void)
void RemoveContext (CitContext *con)
CitContextCreateNewContext (void)
CitContextCloneContext (CitContext *CloneMe)
CitContextCtdlGetContextArray (int *count)
void begin_session (CitContext *con)
void CtdlFillSystemContext (CitContext *context, char *name)
void context_cleanup (void)
void dead_session_purge (int force)
void InitializeMasterCC (void)
void set_async_waiting (struct CitContext *ccptr)
char * ctdl_module_session_init (int threading)


pthread_key_t MyConKey
CitContext masterCC
CitContextContextList = NULL
time_t last_purge = 0
int num_sessions = 0
int next_pid = 0
static int want_single_user = 0

Function Documentation

◆ begin_session()

◆ BumpNewMailCounter()

void BumpNewMailCounter ( long  which_user)

Definition at line 125 of file context.c.

References CtdlBumpNewMailCounter().

◆ CloneContext()

◆ context_cleanup()

void context_cleanup ( void  )

◆ CreateNewContext()

◆ ctdl_module_session_init()

char* ctdl_module_session_init ( int  threading)

Definition at line 716 of file context.c.

◆ CtdlBumpNewMailCounter()

void CtdlBumpNewMailCounter ( long  which_user)

◆ CtdlEndSingleUser()

void CtdlEndSingleUser ( void  )

Definition at line 49 of file context.c.

References begin_critical_section(), end_critical_section(), S_SINGLE_USER, and want_single_user.

Referenced by cmd_migr().

◆ CtdlFillSystemContext()

◆ CtdlGetContextArray()

◆ CtdlIsSingleUser()

int CtdlIsSingleUser ( void  )

Definition at line 63 of file context.c.

References num_sessions, and want_single_user.

Referenced by do_housekeeping().

◆ CtdlIsUserLoggedIn()

int CtdlIsUserLoggedIn ( char *  user_name)

◆ CtdlIsUserLoggedInByNum()

int CtdlIsUserLoggedInByNum ( long  usernum)

◆ CtdlTerminateOtherSession()

◆ CtdlTrySingleUser()

int CtdlTrySingleUser ( void  )

Definition at line 32 of file context.c.

References begin_critical_section(), end_critical_section(), S_SINGLE_USER, and want_single_user.

Referenced by cmd_migr().

◆ CtdlWantSingleUser()

int CtdlWantSingleUser ( void  )

Definition at line 57 of file context.c.

References want_single_user.

Referenced by begin_session().

◆ dead_session_purge()

◆ InitializeMasterCC()

void InitializeMasterCC ( void  )

Definition at line 691 of file context.c.

References CitContext::cs_pid, CitContext::internal_pgm, and masterCC.

Referenced by main().

◆ MyContext()

CitContext* MyContext ( void  )

Definition at line 201 of file context.c.

References masterCC, and MyConKey.

Referenced by CtdlSockGetLine(), CtdlUserLogout(), files_logout_hook(), sock_getln(), and sock_getln_err().

◆ RemoveContext()

◆ set_async_waiting()

void set_async_waiting ( struct CitContext ccptr)

◆ terminate_all_sessions()

◆ terminate_idle_sessions()

Variable Documentation

◆ ContextList

◆ last_purge

time_t last_purge = 0

Definition at line 23 of file context.c.

Referenced by dead_session_purge(), and purge_databases().

◆ masterCC

CitContext masterCC

Definition at line 21 of file context.c.

Referenced by InitializeMasterCC(), main(), and MyContext().

◆ MyConKey

pthread_key_t MyConKey

Definition at line 20 of file context.c.

Referenced by become_session(), init_sysdep(), MyContext(), and PerformSessionHooks().

◆ next_pid

int next_pid = 0

Definition at line 25 of file context.c.

Referenced by CloneContext(), and CreateNewContext().

◆ num_sessions

◆ want_single_user

int want_single_user = 0