summaryrefslogtreecommitdiffstats
path: root/bchannel.c
diff options
context:
space:
mode:
authorSuper User2008-06-17 12:41:10 +0200
committerSuper User2008-06-17 12:41:10 +0200
commitecfd5575fa051133b233a2162f00ee23f133b267 (patch)
treefbfe8590156cc09a9e9784252999908af8ab8bf5 /bchannel.c
parentfixed bchannel create (diff)
downloadlcr-ecfd5575fa051133b233a2162f00ee23f133b267.tar.gz
lcr-ecfd5575fa051133b233a2162f00ee23f133b267.tar.xz
lcr-ecfd5575fa051133b233a2162f00ee23f133b267.zip
fixed socket handling
modified: bchannel.c
Diffstat (limited to 'bchannel.c')
-rw-r--r--bchannel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bchannel.c b/bchannel.c
index 288d3eb..fafcf1f 100644
--- a/bchannel.c
+++ b/bchannel.c
@@ -113,7 +113,7 @@ int bchannel_create(struct bchannel *bchannel, int mode)
unsigned int on = 1;
struct sockaddr_mISDN addr;
- if (bchannel->b_sock)
+ if (bchannel->b_sock > -1)
{
CERROR(NULL, NULL, "Socket already created for handle 0x%x\n", bchannel->handle);
return(0);
@@ -589,6 +589,7 @@ struct bchannel *alloc_bchannel(unsigned int handle)
return(NULL);
(*bchannelp)->handle = handle;
(*bchannelp)->b_state = BSTATE_IDLE;
+ (*bchannelp)->b_sock = -1;
return(*bchannelp);
}