[Pkg-voip-commits] [dahdi-tools] 200/285: dahdi_cfg: Warn if idle bits are set on invalid channel type.

tzafrir at debian.org tzafrir at debian.org
Thu Jul 7 19:18:57 UTC 2016


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch master
in repository dahdi-tools.

commit 49361e5ce76022a1204f699488208842ee9200ef
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Tue Jul 8 16:41:04 2014 -0500

    dahdi_cfg: Warn if idle bits are set on invalid channel type.
    
    Hopefully will save a little time in the future if anyone ever types into
    /etc/dahdi/system.conf:
    
      bchan=1-15,17-30:1101
    
    when they meant:
    
      cas=1-15,17-30:1101
    
    in the future.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>
---
 dahdi_cfg.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dahdi_cfg.c b/dahdi_cfg.c
index 90bd466..c8369db 100644
--- a/dahdi_cfg.c
+++ b/dahdi_cfg.c
@@ -762,7 +762,16 @@ static int chanconfig(char *keyword, char *args)
 			} else {
 				fprintf(stderr, "Huh? (%s)\n", keyword);
 			}
-			if (is_digital)
+
+			if (cc[x].sigtype != DAHDI_SIG_CAS &&
+			    cc[x].sigtype != DAHDI_SIG_DACS &&
+			    cc[x].sigtype != DAHDI_SIG_DACS_RBS) {
+				if (NULL != idle) {
+					fprintf(stderr, "WARNING: idlebits are not valid on %s channels.\n", sig[x]);
+				}
+			}
+
+			if (is_digital) 
 				chan2span[x] = current_span;
 			else
 				current_span = 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git



More information about the Pkg-voip-commits mailing list