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

Function ensure_global_context

context.c:130–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128
129
130int ensure_global_context(void)
131{
132 if (current_processing_ctx)
133 return 0;
134
135 current_processing_ctx = context_alloc(CONTEXT_GLOBAL);
136 if (!current_processing_ctx) {
137 LM_ERR("oom\n");
138 return -1;
139 }
140
141 memset(current_processing_ctx, 0, context_size(CONTEXT_GLOBAL));
142 return 0;
143}
144
145
146#define CTX_STACK_SIZE 8

Callers 2

init_unit_testsFunction · 0.85
opensips_fuzz_initFunction · 0.85

Calls 1

context_allocFunction · 0.85

Tested by 1

init_unit_testsFunction · 0.68