Skip to content
Snippets Groups Projects
Commit cdce3c5a authored by Grzegorz Sluja's avatar Grzegorz Sluja Committed by Sukru Senli
Browse files

Prevent from creating invalid cdr call log records

parent c983367a
Branches
Tags
No related merge requests found
...@@ -338,7 +338,7 @@ static int csv_log(struct ast_cdr *cdr) ...@@ -338,7 +338,7 @@ static int csv_log(struct ast_cdr *cdr)
char buf[1024]; char buf[1024];
/* Don't create records for CDRs where dcontext = "hangup" */ /* Don't create records for CDRs where dcontext = "hangup" */
if (!strcasecmp(cdr->dcontext, "hangup")) { if (ast_strlen_zero(cdr->dcontext) || !strcasecmp(cdr->dcontext, "hangup") || ast_strlen_zero(cdr->dstchannel)) {
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment