summaryrefslogtreecommitdiffstats
path: root/src/input/misdn.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-06-30 12:19:42 +0200
committerPablo Neira Ayuso2011-06-30 12:19:42 +0200
commitc9c4fd39055ab02c0af59d5519e62edc456e3d0b (patch)
treeb4ddf50a9b715a7a0270077e21790e8ec5efaf59 /src/input/misdn.c
parentipaccess: use E1INP_SIGN_OML instead of hardcoded 1 (diff)
downloadlibosmo-abis-c9c4fd39055ab02c0af59d5519e62edc456e3d0b.tar.gz
libosmo-abis-c9c4fd39055ab02c0af59d5519e62edc456e3d0b.tar.xz
libosmo-abis-c9c4fd39055ab02c0af59d5519e62edc456e3d0b.zip
major updates in e1_input callback ops and IPA infrastructures
This patch is a major update of the callback infrastructure, now the e1input_ops looks like the following: struct e1inp_sign_link * (*sign_link_up)(void *unit_info, struct e1inp_line *line, enum e1inp_sign_type type); void (*sign_link_down)(struct e1inp_line *line); int (*sign_link)(struct msgb *msg, struct e1inp_sign_link *link); The sign_link_up and sign_link_down will be used by the A-bis over IP input drivers. The sign_link_up callback is used if we receive a ID_RESP message, in that case, we have to set up the sign link for the corresponding new OML/RSL signal link. The pointer to unit_info provides a data structure that contains the BTS device details if we run as BSC, and the requested device information from the BSC if we run as BTS. The sign_link_up callback must return the new sign_link created. The sign_link_down callback is invoked if the line does down, which means that the counterpart has closed the socket. The sign_link callback is used to handle all RSL/OML messages. I have also added the following callback to the e1inp_driver: + void (*close)(struct e1inp_ts *ts); Which is invoked if you call e1inp_sign_link_destroy(). This callback is used to close the socket that is linked to that timeslot. This is useful for A-bis over IP drivers since sockets are closed if the OML/RSL signalling link is destroyed. As you can notice, I have also added all the ID_RESP parsing into libosmo-abis for both ipaccess and hsl drivers. This patch also contains a rework of the ipa_client_link whose integration with the e1_input infrastructure was broken (the transmission path was broken). This patch also contains more develop examples that act as BSC and BTS for the ipaccess driver. Sorry, I know it would be better to split all these changes into logical pieces but many of them are tightly related. This is under heavy development stage, it's anyway hard to track changes until this becomes more stable.
Diffstat (limited to 'src/input/misdn.c')
-rw-r--r--src/input/misdn.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/input/misdn.c b/src/input/misdn.c
index cf8b5d9..9bf3aea 100644
--- a/src/input/misdn.c
+++ b/src/input/misdn.c
@@ -109,8 +109,7 @@ static int handle_ts1_read(struct osmo_fd *bfd)
}
if (alen != sizeof(l2addr)) {
- if (line->ops->error)
- line->ops->error(NULL, line, ts_nr, -EBADMSG);
+ fprintf(stderr, "%s error len\n", __func__);
return -EINVAL;
}
@@ -173,8 +172,6 @@ static int handle_ts1_read(struct osmo_fd *bfd)
l2addr.channel, l2addr.sapi, l2addr.tei);
break;
default:
- if (line->ops->error)
- line->ops->error(NULL, line, ts_nr, -EBADMSG);
break;
}
return ret;