mirror of
https://github.com/kakwa/uts-server
synced 2025-07-03 12:07:02 +02:00
enabling multi-threads support
as TS_RESP_CTX is not thread safe, this commit implement a pool of TS_RESP_CTX in which a thread can pick one in a thread safe maner. * implement a ts_resp_ctx_wrapper containing a TS_RESP_CTX and a lock and bool to mark the availability of the TS_RESP_CTX * implement the get_ctxw to recover a given TS_RESP_CTX in a thread safe maner * adapt the rest of the code to accomodate the new way of doing things * set the default number of threads to 10 as it's now safe to do so
This commit is contained in:
parent
81d7a808cb
commit
e948177a41
6 changed files with 56 additions and 12 deletions
|
@ -8,6 +8,6 @@ void log_hex(rfc3161_context *ct, int priority, char *id,
|
|||
unsigned char *content, int content_length);
|
||||
int set_params(rfc3161_context *ct, char *conf_file, char *conf_wd);
|
||||
static char *rand_string(char *str, size_t size);
|
||||
void free_uts_context(rfc3161_context *context);
|
||||
void free_uts_context(rfc3161_context *ct);
|
||||
int g_uts_sig_up;
|
||||
int g_uts_sig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue