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)  

context.h File Reference
#include <stdarg.h>
#include "sysdep.h"
#include "server.h"
#include "sysdep_decls.h"
#include "threads.h"
Include dependency graph for context.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CitContext
 

Macros

#define __CIT_CONTEXT__
 
#define CC   MyContext()
 
#define TERM_FOUND   0x01
 
#define TERM_ALLOWED   0x02
 
#define TERM_KILLED   0x03
 
#define TERM_NOTALLOWED   -1
 

Typedefs

typedef enum __CCState CCState
 
typedef struct CitContext CitContext
 

Enumerations

enum  __CCState {
  CON_IDLE , CON_GREETING , CON_STARTING , CON_READY ,
  CON_EXECUTING , CON_SYS
}
 

Functions

CitContextMyContext (void)
 
void RemoveContext (struct CitContext *)
 
CitContextCreateNewContext (void)
 
void context_cleanup (void)
 
void kill_session (int session_to_kill)
 
void InitializeMasterCC (void)
 
void dead_session_purge (int force)
 
void set_async_waiting (struct CitContext *ccptr)
 
CitContextCloneContext (CitContext *CloneMe)
 
void terminate_all_sessions (void)
 
void BumpNewMailCounter (long)
 
void terminate_idle_sessions (void)
 
int CtdlTerminateOtherSession (int session_num)
 
static void become_session (CitContext *which_con)
 

Variables

pthread_key_t MyConKey
 
int num_sessions
 
CitContext masterCC
 
CitContextContextList
 

Macro Definition Documentation

◆ __CIT_CONTEXT__

#define __CIT_CONTEXT__

Definition at line 32 of file context.h.

◆ CC

#define CC   MyContext()

Definition at line 140 of file context.h.

◆ TERM_ALLOWED

#define TERM_ALLOWED   0x02

Definition at line 168 of file context.h.

◆ TERM_FOUND

#define TERM_FOUND   0x01

Definition at line 167 of file context.h.

◆ TERM_KILLED

#define TERM_KILLED   0x03

Definition at line 169 of file context.h.

◆ TERM_NOTALLOWED

#define TERM_NOTALLOWED   -1

Definition at line 170 of file context.h.

Typedef Documentation

◆ CCState

typedef enum __CCState CCState

◆ CitContext

typedef struct CitContext CitContext

Definition at line 33 of file context.h.

Enumeration Type Documentation

◆ __CCState

enum __CCState
Enumerator
CON_IDLE 
CON_GREETING 
CON_STARTING 
CON_READY 
CON_EXECUTING 
CON_SYS 

Definition at line 22 of file context.h.

Function Documentation

◆ become_session()

static void become_session ( CitContext which_con)
static

Definition at line 175 of file context.h.

References MyConKey.

Referenced by RemoveContext(), and worker_thread().

◆ BumpNewMailCounter()

void BumpNewMailCounter ( long  which_user)

Definition at line 125 of file context.c.

References CtdlBumpNewMailCounter().

◆ CloneContext()

◆ context_cleanup()

void context_cleanup ( void  )

◆ CreateNewContext()

◆ CtdlTerminateOtherSession()

◆ 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().

◆ kill_session()

void kill_session ( int  session_to_kill)

◆ 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

◆ masterCC

CitContext masterCC
extern

Definition at line 21 of file context.c.

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

◆ MyConKey

pthread_key_t MyConKey
extern

Definition at line 20 of file context.c.

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

◆ num_sessions