From 93c620107e2edca4ac3306a995d512c7924453a2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 26 Jun 2011 19:12:47 +0200 Subject: ipaccess: fix write path for OML socket We have to use e1i_ts->driver.ipaccess.fd file descriptor to fix the write path. Otherwise, openBSC never delivers replies to OML messages. --- src/input/ipaccess.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index d1ada94..5d084d8 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -336,10 +336,6 @@ static int ipaccess_bsc_oml_cb(struct ipa_server_link *link, int fd) struct e1inp_ts *e1i_ts; struct osmo_fd *bfd; - bfd = talloc_zero(tall_ipa_ctx, struct osmo_fd); - if (!bfd) - return -ENOMEM; - /* create virrtual E1 timeslots for signalling */ e1inp_ts_config_sign(&line->ts[1-1], line); @@ -349,6 +345,7 @@ static int ipaccess_bsc_oml_cb(struct ipa_server_link *link, int fd) e1i_ts = &line->ts[idx]; + bfd = &e1i_ts->driver.ipaccess.fd; bfd->fd = fd; bfd->data = line; bfd->priv_nr = E1INP_SIGN_OML; @@ -358,7 +355,6 @@ static int ipaccess_bsc_oml_cb(struct ipa_server_link *link, int fd) if (ret < 0) { LOGP(DINP, LOGL_ERROR, "could not register FD\n"); close(bfd->fd); - talloc_free(bfd); return ret; } -- cgit v1.2.3-55-g7522