MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / init_log_level

Function init_log_level

dprint.c:914–933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912}
913
914int init_log_level(void)
915{
916 log_level = &pt[process_no].log_level;
917 default_log_level = &pt[process_no].default_log_level;
918
919 if (process_no==0) {
920 /* this is done only by the first process */
921 log_level_global = (int*)shm_malloc(sizeof(int));
922 if (log_level_global==NULL) {
923 LM_ERR("Failed to allocate shm memory for global log_level\n");
924 return -1;
925 }
926 *log_level_global = log_level_holder;
927 }
928
929 *log_level = *log_level_global;
930 *default_log_level = *log_level_global;
931
932 return 0;
933}
934
935/* call before pt is freed */
936void cleanup_log_level(void)

Callers 1

Calls 1

shm_mallocFunction · 0.85

Tested by

no test coverage detected