aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-25 13:35:10 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-25 13:38:28 +0100
commitfd5d8d2ac14d26e90b3b1d60895a856c76d8fd68 (patch)
tree883e416e5d63c1f8cd7c74b1d7026a75625c2dfb
parent7d336a55ed308ef01d4d8e54c89ddab1b7915ee6 (diff)
mtp: Send the TFP/TRA/TFA with the first SLS provided by that link1.1.0
-rw-r--r--src/mtp_layer3.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c
index 8013b72..00debb6 100644
--- a/src/mtp_layer3.c
+++ b/src/mtp_layer3.c
@@ -87,17 +87,18 @@ static struct msgb *mtp_create_slta(struct mtp_link_set *link, int sls,
}
-static struct msgb *mtp_base_alloc(struct mtp_link_set *link, int msg, int apoc)
+static struct msgb *mtp_base_alloc(struct mtp_link *link, int msg, int apoc)
{
struct mtp_level_3_hdr *hdr;
struct mtp_level_3_prohib *prb;
- struct msgb *out = mtp_msg_alloc(link);
+ struct msgb *out = mtp_msg_alloc(link->set);
if (!out)
return NULL;
hdr = (struct mtp_level_3_hdr *) out->l2h;
hdr->ser_ind = MTP_SI_MNT_SNM_MSG;
+ hdr->addr = MTP_ADDR(link->first_sls, link->set->dpc, link->set->opc);
prb = (struct mtp_level_3_prohib *) msgb_put(out, sizeof(*prb));
prb->cmn.h0 = MTP_PROHIBIT_MSG_GRP;
prb->cmn.h1 = msg;
@@ -107,12 +108,12 @@ static struct msgb *mtp_base_alloc(struct mtp_link_set *link, int msg, int apoc)
static struct msgb *mtp_tfp_alloc(struct mtp_link *link, int apoc)
{
- return mtp_base_alloc(link->set, MTP_PROHIBIT_MSG_SIG, apoc);
+ return mtp_base_alloc(link, MTP_PROHIBIT_MSG_SIG, apoc);
}
static struct msgb *mtp_tfa_alloc(struct mtp_link *link, int apoc)
{
- return mtp_base_alloc(link->set, MTP_PROHIBIT_MSG_TFA, apoc);
+ return mtp_base_alloc(link, MTP_PROHIBIT_MSG_TFA, apoc);
}
static struct msgb *mtp_tra_alloc(struct mtp_link *link, int opc)