diff --git a/res/res_features.c b/res/res_features.c index a9c252b7e681d62627a66249dbef9ca56cdd56c0..dea8d805ae7af2d82d2f060fd2ce117933bc66ac 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1990,7 +1990,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast /* absorb the peer cdr */ ast_cdr_merge(bridge_cdr, peer->cdr); - if (ast_test_flag(peer->cdr, AST_CDR_FLAG_LOCKED)) + if (!ast_test_flag(peer->cdr, AST_CDR_FLAG_LOCKED)) ast_cdr_discard(peer->cdr); /* if locked cdrs are in peer, they are taken over in the merge */ peer->cdr = NULL;