tbf_ul: Assign DL-TBF if needed after UL-TBF has gone over contenion resolution

If data received from SGSN is waiting to be sent to the MS, we may have
created a DL-TBF assignment over PCH if the MS was not in packet-active
mode. If the MS instead reaches back to the PCU asking for an UL-TBF, the
PCU has to wait until Content Resolution of the UL-TBF has succeeded in order
to attempt now to assign the DL-TBF over PACCH.
The delay was already there, but the trigger to attempt the DL-TBF
assignment upon UL-TBF contention reslution success was missing.

Related: OS#5700
Change-Id: Ib8f7ad2390485ce9fd76a9de6cd349a5f4037568
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index bd885b6..d07998c 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -287,6 +287,12 @@
 	t_stop(T3141, "Contention resolution success (UL-TBF, CCCH)");
 
 	bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_UL_TBF_CONTENTION_RESOLUTION_SUCCESS);
+
+	/* Check if we can create a DL TBF to start sending the enqueued
+	* data. Otherwise it will be triggered later when it is reachable
+	* again. */
+	if (ms_need_dl_tbf(ms()) && !tbf_ul_ack_waiting_cnf_final_ack(this))
+		ms_new_dl_tbf_assigned_on_pacch(ms(), this);
 }
 
 /*! \brief receive data from PDCH/L1 */