summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2007-08-24 19:03:39 +0000
committerSteve Murphy <murf@digium.com>2007-08-24 19:03:39 +0000
commit9931947a6e6d018f84065ca74f3de6a800bd3320 (patch)
tree2ae896968814226a464d467781891aeea17f55b6
parent3616eb166f18634660b5c4c0c0d67308194c2535 (diff)
Merged revisions 80789 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80789 | murf | 2007-08-24 12:52:15 -0600 (Fri, 24 Aug 2007) | 1 line 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: https://origsvn.digium.com/svn/asterisk/trunk@80790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--main/cdr.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/main/cdr.c b/main/cdr.c
index 6cbb52f7e..42c617714 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -738,27 +738,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;