aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-24 11:23:01 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-24 11:23:01 +0100
commitf5e71415a2bbf0108eacba607717e0944a259c37 (patch)
treea6402d5323fdead5da1e7fba052da02de69a0fb0 /openbsc
parent82a8d6e3931dea7f127f84e9f6c4102d858410da (diff)
parentedee7944a5079591b49e6b80047ddecaba5891c2 (diff)
Merge remote branch 'origin/master' into on-waves/bsc-master
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/input/ipaccess.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c
index 3e266894b..91d75633f 100644
--- a/openbsc/src/input/ipaccess.c
+++ b/openbsc/src/input/ipaccess.c
@@ -255,6 +255,7 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
LOGP(DINP, LOGL_ERROR, "BTS is still registered. Closing old connection.\n");
bsc_unregister_fd(newbfd);
close(newbfd->fd);
+ newbfd->fd = -1;
}
/* get rid of our old temporary bfd */
@@ -515,6 +516,7 @@ static int listen_fd_cb(struct bsc_fd *listen_bfd, unsigned int what)
{
int ret;
int idx = 0;
+ int i;
struct e1inp_line *line;
struct e1inp_ts *e1i_ts;
struct bsc_fd *bfd;
@@ -542,6 +544,10 @@ static int listen_fd_cb(struct bsc_fd *listen_bfd, unsigned int what)
/* create virrtual E1 timeslots for signalling */
e1inp_ts_config(&line->ts[1-1], line, E1INP_TS_TYPE_SIGN);
+ /* initialize the fds */
+ for (i = 0; i < ARRAY_SIZE(line->ts); ++i)
+ line->ts[i].driver.ipaccess.fd.fd = -1;
+
e1i_ts = &line->ts[idx];
bfd = &e1i_ts->driver.ipaccess.fd;