9
0
Fork 0

m3ua/sccp: Allow to skip T18/T20 TFP/TRA handling completely

For M3UA we already skip the link-test handling and there is no
point in waiting for management messages to collect routing info.
We already know where to send things. At first I tried to overload
the skip handling but it is better to just set the timer to 0 and
then move on.
This commit is contained in:
Holger Hans Peter Freyther 2015-10-23 14:06:36 +08:00
parent 68acda7f22
commit 72722c34b0
1 changed files with 12 additions and 2 deletions

View File

@ -35,6 +35,9 @@
static int mtp_int_submit(struct mtp_link_set *set, int opc, int dpc, int sls, int type, const uint8_t *data, unsigned int length);
static void linkset_t18_cb(void *_set);
static void linkset_t20_cb(void *_set);
struct msgb *mtp_msg_alloc(struct mtp_link_set *set)
{
struct mtp_level_3_hdr *hdr;
@ -240,8 +243,10 @@ int mtp_link_verified(struct mtp_link *link)
return 0;
set->linkset_up = 1;
osmo_timer_schedule(&set->T18, set->timeout_t18, 0);
osmo_timer_schedule(&set->T20, set->timeout_t20, 0);
if (set->timeout_t18 != 0)
osmo_timer_schedule(&set->T18, set->timeout_t18, 0);
if (set->timeout_t20 != 0)
osmo_timer_schedule(&set->T20, set->timeout_t20, 0);
/* More the functionality of a SSP here... */
if (set->sccp_opc != set->opc &&
@ -256,6 +261,11 @@ int mtp_link_verified(struct mtp_link *link)
"Failed to send TFA for OPC %d on linkset %d.\n", set->sccp_opc, set->nr);
}
if (set->timeout_t18 == 0)
linkset_t18_cb(set);
if (set->timeout_t20 == 0)
linkset_t20_cb(set);
return 0;
}