aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-06-02 03:25:24 +0000
committerHolger Freyther <zecke@selfish.org>2009-06-02 03:25:24 +0000
commit8521e5f050b20f3835c929d4c6804902e726cf2a (patch)
treeb29ae8af2354fa6c228427037be3a6883fa5025e /src
parentb8be6543cdcd9d734eeb045dd282ce7ef6315364 (diff)
[l2] Do not always release the layer2 when closing the socket (Andreas Eversberg)
Tells mISDN not to release layer 2 on closing socket, when not requested. If mISDN was told to release layer 2 once, it will continue to release layer 2 on every shutdown of OpenBSC.
Diffstat (limited to 'src')
-rw-r--r--src/input/misdn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/input/misdn.c b/src/input/misdn.c
index 77da77c8e..de8d41f21 100644
--- a/src/input/misdn.c
+++ b/src/input/misdn.c
@@ -445,9 +445,8 @@ static int mi_e1_setup(struct e1inp_line *line, int release_l2)
return -EIO;
}
- if (e1i_ts->type == E1INP_TS_TYPE_SIGN && release_l2) {
- int clean = 1;
- ret = ioctl(bfd->fd, IMCLEAR_L2, &clean);
+ if (e1i_ts->type == E1INP_TS_TYPE_SIGN) {
+ ret = ioctl(bfd->fd, IMCLEAR_L2, &release_l2);
if (ret < 0) {
fprintf(stderr, "could not send IOCTL IMCLEAN_L2 %s\n", strerror(errno));
return -EIO;