summaryrefslogtreecommitdiff
path: root/ztcfg.c
diff options
context:
space:
mode:
authortilghman <tilghman@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-11 22:50:08 +0000
committertilghman <tilghman@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-11 22:50:08 +0000
commit05b9910ea45cb34816ce2eb4143c4d3f2919a10b (patch)
tree72e625c5c71188e2a5267387e3944574c5215366 /ztcfg.c
parent89b84a74177ec06a18c583a01eb2795a7c3d41af (diff)
Bug 6816 - Allow nethdlc device to take optional alternative name
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1053 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'ztcfg.c')
-rw-r--r--ztcfg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ztcfg.c b/ztcfg.c
index 15af02a..660f28e 100644
--- a/ztcfg.c
+++ b/ztcfg.c
@@ -552,11 +552,15 @@ static int chanconfig(char *keyword, char *args)
}
} else if (!strcasecmp(keyword, "nethdlc")) {
sig[x] = sigtype_to_str(ZT_SIG_HDLCNET);
+ memset(cc[x].netdev_name, 0, sizeof(cc[x].netdev_name));
if (master) {
cc[x].sigtype = ZT_SIG_SLAVE;
cc[x].master = master;
} else {
cc[x].sigtype = ZT_SIG_HDLCNET;
+ if (idle) {
+ strncpy(cc[x].netdev_name, idle, sizeof(cc[x].netdev_name) - 1);
+ }
master = x;
}
} else if (!strcasecmp(keyword, "fcshdlc")) {