95 log_write(sm->
log, LOG_ERR,
"request to create user for non-serviced domain: jid=%s",
jid_user(jid));
110 log_debug(
ZONE,
"user create failed, forcing deletion for cleanup");
135 while(scan != NULL) {
data structures and prototypes for the session manager
int nindex
counter for module instance sequence (!!! should be local to mm_new)
int mm_user_load(mm_t mm, user_t user)
load user data
const char * jid_user(jid_t jid)
expand and return the user
void log_write(log_t log, int level, const char *msgfmt,...)
void sm_c2s_action(sess_t dest, const char *action, const char *target)
send a new action route
void user_free(user_t user)
xht users
pointers to currently loaded users (key is user@domain)
void mm_user_delete(mm_t mm, jid_t jid)
delete user
sess_t next
next session (in a list of sessions)
void pool_cleanup(pool_t p, pool_cleanup_t f, void *arg)
public cleanup utils, insert in a way that they are run FIFO, before mem frees
void sess_end(sess_t sess)
pool_t p
memory pool this user is allocated off
sess_t sessions
list of action sessions
void * pmalloco(pool_t p, int size)
easy safety utility (for creating blank mem for structs, etc)
static user_t _user_alloc(sm_t sm, jid_t jid)
make a new one
session manager global context
void jid_free(jid_t jid)
free a jid
void xhash_put(xht h, const char *key, void *val)
void xhash_zap(xht h, const char *key)
int mm_user_create(mm_t mm, jid_t jid)
create user
user_t user_load(sm_t sm, jid_t jid)
fetch user data
There is one instance of this struct per user who is logged in to this c2s instance.
jid_t jid_dup(jid_t jid)
duplicate a jid
jid_t jid
user jid (user@host)
void * xhash_get(xht h, const char *key)
void user_delete(sm_t sm, jid_t jid)
trash a user
void ** module_data
per-user module data
pool - base node for a pool.
int user_create(sm_t sm, jid_t jid)
initialise a user