Skip to content

Commit 7c93e59

Browse files
committed
context: return 0 if pushing context fails 1 otherwise
1 parent 6786b8e commit 7c93e59

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

context.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ int push_new_global_context(void)
151151
{
152152
if (ctx_stack_idx==CTX_STACK_SIZE) {
153153
LM_ERR("too many stacked contexts (%d)\n",ctx_stack_idx);
154-
return -1;
154+
return 0;
155155
}
156156

157157
ctx_stack[ctx_stack_idx++] = current_processing_ctx;
@@ -160,11 +160,11 @@ int push_new_global_context(void)
160160
if (!current_processing_ctx) {
161161
LM_ERR("oom\n");
162162
current_processing_ctx = ctx_stack[--ctx_stack_idx];
163-
return -1;
163+
return 0;
164164
}
165165

166166
memset(current_processing_ctx, 0, context_size(CONTEXT_GLOBAL));
167-
return 0;
167+
return 1;
168168
}
169169

170170
int pop_pushed_global_context(void)

0 commit comments

Comments
 (0)