diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-10-23 14:06:36 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-10-23 14:06:36 +0800 |
commit | 72722c34b0d6e5db4dbd71dc844acedc574a2ae3 (patch) | |
tree | 2805406e62b9e8eed0826e98a7263267a68e425f | |
parent | 68acda7f223f59b809b11cf009b1c008e747cc91 (diff) |
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.
-rw-r--r-- | src/mtp_layer3.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c index c4bbab4..9ff3602 100644 --- a/src/mtp_layer3.c +++ b/src/mtp_layer3.c @@ -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; } |