Merged revisions 67073 via svnmerge from
[asterisk/asterisk.git] / main / cdr.c
index fb1ce17..7e3ab5b 100644 (file)
@@ -754,7 +754,7 @@ static void set_one_cid(struct ast_cdr *cdr, struct ast_channel *c)
 int ast_cdr_setcid(struct ast_cdr *cdr, struct ast_channel *c)
 {
        for (; cdr; cdr = cdr->next) {
-               if (ast_test_flag(cdr, AST_CDR_FLAG_LOCKED))
+               if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED))
                        set_one_cid(cdr, c);
        }
        return 0;