aboutsummaryrefslogtreecommitdiffstats
path: root/src/mtp_layer3.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-18 18:52:34 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-20 11:37:50 +0100
commit27c5e2357fb2ad60c952db6688e5d93f3e7131b3 (patch)
tree5a8f1da2ed86401518490afb13260ffe019ec4ac /src/mtp_layer3.c
parentbee2ed18c7fd1d8316a17a0ff3ba97f7b518c00e (diff)
mtp: Send the TFP for every POC we want to handle.
Diffstat (limited to 'src/mtp_layer3.c')
-rw-r--r--src/mtp_layer3.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c
index 1138d3c..5826dd4 100644
--- a/src/mtp_layer3.c
+++ b/src/mtp_layer3.c
@@ -289,6 +289,17 @@ void mtp_link_set_reset(struct mtp_link_set *link)
bsc_schedule_timer(&link->delay_timer, START_DELAY);
}
+static int send_tfp(struct mtp_link_set *link, int apoc)
+{
+ struct msgb *msg;
+ msg = mtp_tfp_alloc(link, apoc);
+ if (!msg)
+ return -1;
+
+ mtp_link_set_submit(link->slc[0], msg);
+ return 0;
+}
+
static int mtp_link_sign_msg(struct mtp_link_set *link, struct mtp_level_3_hdr *hdr, int l3_len)
{
struct msgb *msg;
@@ -313,10 +324,16 @@ static int mtp_link_sign_msg(struct mtp_link_set *link, struct mtp_level_3_hdr *
link->sccp_up = 0;
mtp_link_set_sccp_down(link);
- msg = mtp_tfp_alloc(link, 0);
- if (!msg)
+ if (send_tfp(link, 0) != 0)
+ return -1;
+ if (send_tfp(link, link->opc) != 0)
+ return -1;
+ if (link->sccp_opc != link->opc &&
+ send_tfp(link, link->sccp_opc) != 0)
+ return -1;
+ if (link->isup_opc != link->opc &&
+ send_tfp(link, link->isup_opc) != 0)
return -1;
- mtp_link_set_submit(link->slc[0], msg);
msg = mtp_tra_alloc(link);
if (!msg)