diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-24 18:52:15 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-24 18:52:15 +0000 |
commit | c00b801d7374a8cccd4d73747a7e70f4fbc3a6dd (patch) | |
tree | e9a8c4ecbb29b4cd848a501113578c7b26758fc5 /main/cdr.c | |
parent | c9b212e87a49271d22e127ecfe53c52f3f8f9abc (diff) |
From a complaint by jmls, I realize that the message in cdr_disposition is unnecessary. To get failure disposition, just return -1; no use having more than one case do that.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80789 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cdr.c')
-rw-r--r-- | main/cdr.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/main/cdr.c b/main/cdr.c index b81be5711..24809c651 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -740,27 +740,23 @@ void ast_cdr_noanswer(struct ast_cdr *cdr) } } +/* everywhere ast_cdr_disposition is called, it will call ast_cdr_failed() + if ast_cdr_disposition returns a non-zero value */ + int ast_cdr_disposition(struct ast_cdr *cdr, int cause) { int res = 0; for (; cdr; cdr = cdr->next) { - switch(cause) { + switch(cause) { /* handle all the non failure, busy cases, return 0 not to set disposition, + return -1 to set disposition to FAILED */ case AST_CAUSE_BUSY: ast_cdr_busy(cdr); break; - case AST_CAUSE_FAILURE: - case AST_CAUSE_NORMAL_CIRCUIT_CONGESTION: - ast_cdr_failed(cdr); - break; case AST_CAUSE_NORMAL: break; - case AST_CAUSE_NOTDEFINED: - res = -1; - break; default: res = -1; - ast_log(LOG_WARNING, "Cause (%d) not handled\n", cause); } } return res; |