diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2012-08-16 00:31:40 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2012-08-16 00:31:40 +0200 |
commit | b247d6df8161eb3dfd9f99002b541b72e2b1ac9f (patch) | |
tree | 451bdc46e70548e686371585f0938e7a44828b5b /src/channel/abis_ipa_client.c | |
parent | 4ab29914389f850b5ca9f1f44ce90e9f25076960 (diff) |
ipa: change osmo_ipa_rcvmsg_base to take argument depending on role
If we're acting as client, we don't have to reply ID_ACK to
one received ID_ACK (otherwise, we enter a loop).
Diffstat (limited to 'src/channel/abis_ipa_client.c')
-rw-r--r-- | src/channel/abis_ipa_client.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/channel/abis_ipa_client.c b/src/channel/abis_ipa_client.c index 9c3554d..079ad35 100644 --- a/src/channel/abis_ipa_client.c +++ b/src/channel/abis_ipa_client.c @@ -154,6 +154,14 @@ void osmo_abis_ipa_cli_set_rsl_port(struct osmo_chan *c, uint16_t port) osmo_stream_cli_set_port(s->rsl, port); } +void osmo_abis_ipa_cli_set_unit(struct osmo_chan *c, struct ipaccess_unit *unit) +{ + struct chan_abis_ipa_cli *s = (struct chan_abis_ipa_cli *)&c->data; + + osmo_ipa_unit_free(s->unit); + s->unit = unit; +} + void osmo_abis_ipa_cli_set_cb_signalmsg(struct osmo_chan *c, void (*signal_msg)(struct msgb *msg, int type)) { @@ -257,7 +265,7 @@ abis_ipa_cli_rcvmsg(struct osmo_chan *c, struct osmo_stream_cli *conn, int ret; /* Handle IPA PING, PONG and ID_ACK messages. */ - if (osmo_ipa_rcvmsg_base(msg, ofd)) + if (osmo_ipa_rcvmsg_base(msg, ofd, 0)) /* XXX: 0 indicates client */ return 0; if (msg_type == IPAC_MSGT_ID_GET) { |