From da4fb491de5e3b51407f5902b0bc78c2286e890a Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 2 Jun 2011 20:01:49 +0000 Subject: dahdi: Do not allow 'hwec' to be attached to channels that do not have one. This defines a NULL value for the name of an echocan as invalid. This will allow dahdi_genconf to probe for the presence of a hardware echocan on a channel by trying to attach one. If there is not a hardware echocan available DAHDI_ATTACH_ECHOCAN ioctl will return -EINVAL if 'hwec' was specified as the name of the echo canceler now. Signed-off-by: Shaun Ruffell Acked-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9943 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wcte12xp/base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/dahdi/wcte12xp') diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 1563855..8864aba 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -96,7 +96,6 @@ static const struct t1_desc te121 = {"Wildcard TE121"}; /* names of HWEC modules */ static const char *vpmadt032_name = "VPMADT032"; -static const char *noec_name = "NONE"; #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) static kmem_cache_t *cmd_cache; @@ -1291,7 +1290,7 @@ static const char *t1xxp_echocan_name(const struct dahdi_chan *chan) struct t1 *wc = chan->pvt; if (wc->vpmadt032) return vpmadt032_name; - return noec_name; + return NULL; } static int t1xxp_echocan_create(struct dahdi_chan *chan, -- cgit v1.2.3