9
0
Fork 0

mtp: Send the TFP for every POC we want to handle.

This commit is contained in:
Holger Hans Peter Freyther 2011-01-18 18:52:34 +01:00
parent bee2ed18c7
commit 27c5e2357f
1 changed files with 20 additions and 3 deletions

View File

@ -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)