diff options
author | default <nobody@localhost> | 2024-01-03 11:01:25 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-01-03 11:01:25 +0100 |
commit | e003f87c2d0c06868ec5c225991c38d1f6b935f8 (patch) | |
tree | c01a80254b8392918c6f371c865bcb252ccaf9d3 /snac.h | |
parent | 607335aa741d01230bde873adf420b2cf85ce89f (diff) |
Moved most server state to a structure.
Diffstat (limited to 'snac.h')
-rw-r--r-- | snac.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -31,7 +31,7 @@ void srv_log(xs_str *str); #define srv_debug(level, str) do { if (dbglevel >= (level)) \ { srv_log((str)); } } while (0) -typedef struct _snac { +typedef struct { xs_str *uid; /* uid */ xs_str *basedir; /* user base directory */ xs_dict *config; /* user configuration */ @@ -41,6 +41,14 @@ typedef struct _snac { xs_str *md5; /* actor url md5 */ } snac; +typedef struct { + int srv_running; /* server running on/off */ + int use_fcgi; /* FastCGI use on/off */ + time_t srv_start_time; /* start time */ + int job_fifo_size; /* job fifo size */ + int n_threads; /* number of configured threads */ +} srv_stat; + void snac_log(snac *user, xs_str *str); #define snac_debug(user, level, str) do { if (dbglevel >= (level)) \ { snac_log((user), (str)); } } while (0) |