From 8521e5f050b20f3835c929d4c6804902e726cf2a Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Tue, 2 Jun 2009 03:25:24 +0000 Subject: [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. --- src/input/misdn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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; -- cgit v1.2.3