]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
From a complaint by jmls, I realize that the message in cdr_disposition is unnecessar...
authorSteve Murphy <murf@digium.com>
Fri, 24 Aug 2007 18:52:15 +0000 (18:52 +0000)
committerSteve Murphy <murf@digium.com>
Fri, 24 Aug 2007 18:52:15 +0000 (18:52 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80789 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cdr.c

index b81be5711df22413a05f52877c4622d4a7b25474..24809c6511b64525a301767ca8b273c6931e6cde 100644 (file)
@@ -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;