Skip to content

Commit

Permalink
b2b_logic: Fix pkg_str_dup ret code check
Browse files Browse the repository at this point in the history
Fix bug while checking the return of pkg_str_dup - due to the bad return
check, we were no longer terminating dangling entities with BYE.

Many thanks to David Escartin from Sonoc for reporting and help in
troubleshooting this issue!
  • Loading branch information
razvancrainea committed Dec 7, 2023
1 parent ec6b5c4 commit 5d90a34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/b2b_logic/b2b_logic.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ static void term_entity(b2bl_entity_id_t *entity, int hash_index, str *key)
} else {
if ( key && ( !push_new_global_context() ||
(ctx=b2b_api.get_context())==NULL ||
pkg_str_dup(&ctx->b2bl_key, key)==0 )
pkg_str_dup(&ctx->b2bl_key, key)!=0 )
) {
LM_ERR("preparing ctx for request failed, entity [%.*s]\n",
entity->key.len, entity->key.s);
Expand Down

0 comments on commit 5d90a34

Please sign in to comment.