diff options
author | Harald Welte <laforge@gnumonks.org> | 2013-06-30 20:18:53 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2013-10-06 11:55:19 +0200 |
commit | 6eddd478e2bd8f10dbb5e8fc0f5058c07ce12138 (patch) | |
tree | 56dc068062711dfb6d7684f763fec56526ac7245 | |
parent | 51de9ca3a64ccb652acdfa72f4f4bd27a60f474b (diff) |
ipaccess.c: call sign_link_up() only _after_ tx ID_ACK/ID_RESP
in order to keep the message ordering right, we first send the
ID_ACK/ID_RESP messages, before handing sign_link_up() into the
application. This ensures that no OML messages get transmitted before
the ID_ACK/ID_RESP has been completed
-rw-r--r-- | src/input/ipaccess.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index cf0cc15..4a56569 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -842,16 +842,6 @@ static int ipaccess_bts_read_cb(struct ipa_client_conn *link, struct msgb *msg) ret = -EINVAL; goto err; } - sign_link = link->line->ops->sign_link_up(msg, - link->line, - link->ofd->priv_nr); - if (sign_link == NULL) { - LOGP(DLINP, LOGL_ERROR, - "Unable to set signal link, " - "closing socket.\n"); - ret = -EINVAL; - goto err; - } rmsg = ipa_bts_id_resp(link->line->ops->cfg.ipa.dev, data + 1, len - 1); ret = ipaccess_send(link->ofd->fd, rmsg->data, @@ -873,6 +863,17 @@ static int ipaccess_bts_read_cb(struct ipa_client_conn *link, struct msgb *msg) goto err_rmsg; } msgb_free(rmsg); + + sign_link = link->line->ops->sign_link_up(msg, + link->line, + link->ofd->priv_nr); + if (sign_link == NULL) { + LOGP(DLINP, LOGL_ERROR, + "Unable to set signal link, " + "closing socket.\n"); + ret = -EINVAL; + goto err; + } } msgb_free(msg); return ret; |