[Pkg-voip-commits] [dahdi-tools] 203/285: dahdi_cfg: Reduce mass ioctls on non-existing channels

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 95e9dd71d8060435a939d936235c4fe807254ac0
Author: Russ Meyerriecks <rmeyerriecks at digium.com>
Date:   Wed Jul 23 13:20:14 2014 -0500

    dahdi_cfg: Reduce mass ioctls on non-existing channels
    
    Logic was calling DAHDI_SPECIFY ioctl on all channels up to maximum channel
    limit. Added a short circuit to prevent the ioctl on channels that aren't
    configured.
    
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>
    Acked-by: Shaun Ruffell <sruffell at digium.com>
---
 dahdi_cfg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dahdi_cfg.c b/dahdi_cfg.c
index 432675e..30add83 100644
--- a/dahdi_cfg.c
+++ b/dahdi_cfg.c
@@ -826,8 +826,9 @@ static int apply_fiftysix(void)
 	int chanfd;
 
 	for (x = 1; x < DAHDI_MAX_CHANNELS; x++) {
-		if (skip_channel(x))
+		if (skip_channel(x) || !cc[x].sigtype)
 			continue;
+
 		chanfd = open("/dev/dahdi/channel", O_RDWR);
 		if (chanfd == -1) {
 			fprintf(stderr, 

-- 
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