summaryrefslogtreecommitdiffstats
path: root/bchannel.c
diff options
context:
space:
mode:
authorSuper User2008-06-04 18:09:43 +0200
committerSuper User2008-06-04 18:09:43 +0200
commitd60dae29f9b68bc51e7bb29cbbb62653f8da5191 (patch)
tree826673115eff64ac316efff965224b9f567c1b6d /bchannel.c
parentcall instance is created when lcr_call is called, no we can be sure that ast ... (diff)
downloadlcr-d60dae29f9b68bc51e7bb29cbbb62653f8da5191.tar.gz
lcr-d60dae29f9b68bc51e7bb29cbbb62653f8da5191.tar.xz
lcr-d60dae29f9b68bc51e7bb29cbbb62653f8da5191.zip
fixed bad bug in opening bchannel
modified: Makefile modified: bchannel.c
Diffstat (limited to 'bchannel.c')
-rw-r--r--bchannel.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bchannel.c b/bchannel.c
index 6d28a7c..3db3bc5 100644
--- a/bchannel.c
+++ b/bchannel.c
@@ -141,18 +141,17 @@ int bchannel_create(struct bchannel *bchannel)
CERROR(NULL, NULL, "Failed to set bchannel-socket handle 0x%x into nonblocking IO\n", bchannel->handle);
close(bchannel->b_sock);
bchannel->b_sock = -1;
- bchannel->handle = 0;
return(0);
}
/* bind socket to bchannel */
addr.family = AF_ISDN;
addr.dev = (bchannel->handle>>8)-1;
- addr.channel = bchannel->handle && 0xff;
+ addr.channel = bchannel->handle & 0xff;
ret = bind(bchannel->b_sock, (struct sockaddr *)&addr, sizeof(addr));
if (ret < 0)
{
- CERROR(NULL, NULL, "Failed to bind bchannel-socket for handle 0x%x with mISDN-DSP layer. Did you load mISDNdsp.ko?\n", bchannel->handle);
+ CERROR(NULL, NULL, "Failed to bind bchannel-socket for handle 0x%x with mISDN-DSP layer. (port %d, channel %d) Did you load mISDNdsp.ko?\n", bchannel->handle, addr.dev + 1, addr.channel);
close(bchannel->b_sock);
bchannel->b_sock = -1;
return(0);