mirror of
https://github.com/kakwa/uts-server
synced 2025-07-04 20:47:09 +02:00
code cleaning an reorganization
This commit is contained in:
parent
064f0f8161
commit
eb2b6ae66e
6 changed files with 47 additions and 76 deletions
|
@ -14,10 +14,13 @@
|
|||
#include <fcntl.h>
|
||||
#include "utils.h"
|
||||
|
||||
typedef struct _code {
|
||||
char *c_name;
|
||||
int c_val;
|
||||
} CODE;
|
||||
static void signal_handler_general(int sig_num) {
|
||||
g_uts_sig = sig_num;
|
||||
}
|
||||
|
||||
static void signal_handler_up(int sig_num) {
|
||||
g_uts_sig_up = sig_num;
|
||||
}
|
||||
|
||||
CODE prioritynames[] = {{"alert", LOG_ALERT},
|
||||
{"crit", LOG_CRIT},
|
||||
|
@ -32,14 +35,6 @@ CODE prioritynames[] = {{"alert", LOG_ALERT},
|
|||
{"warning", LOG_WARNING},
|
||||
{NULL, -1}};
|
||||
|
||||
static void signal_handler_general(int sig_num) {
|
||||
g_uts_sig = sig_num;
|
||||
}
|
||||
|
||||
static void signal_handler_up(int sig_num) {
|
||||
g_uts_sig_up = sig_num;
|
||||
}
|
||||
|
||||
int init_pid(char *pidfile_path) {
|
||||
// if pidfile_path is null, the user did not request one
|
||||
// exit success
|
||||
|
@ -381,6 +376,7 @@ end:
|
|||
return 0;
|
||||
}
|
||||
|
||||
// free the rfc3161_context structure
|
||||
void free_uts_context(rfc3161_context *ct) {
|
||||
for (int i = 0; i < ct->numthreads; i++) {
|
||||
TS_RESP_CTX_free(ct->ts_ctx_pool[i].ts_ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue