libmsc: reset the LU delay timer (X36) on MO/MT SMS

We don't want to delay the BSSAP/RANAP connection release any longer
than it takes to submit or deliver an SMS.  Thus, whenever a new SMS
transaction is being allocated, drop the LU token.

Change-Id: Iad4ace6038be4b6037e341e7d9d187bef2917d80
Related: osmo-ttcn3-hacks.git I74fa174ea649adb2112c8e471c0e339a2197a08d
Related: SYS#6913
diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index aa87a19..cbacb43 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -1081,6 +1081,13 @@
 			else
 				msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_SMS);
 		}
+
+		/* If we're re-using the existing LU connection, drop the LU token.
+		 * The idea behind this timer is explained in msc_a_put_use_lu(). */
+		if (osmo_timer_pending(&msc_a->lu_delay_timer)) {
+			osmo_timer_del(&msc_a->lu_delay_timer);
+			msc_a_put(msc_a, MSC_A_USE_LOCATION_UPDATING);
+		}
 	}
 
 	/* Init both SMC and SMR state machines */