fix default_timeout type of osmo_tdef_fsm_inst_state_chg default_timeout

The api doc indicates the possibility to pass -1, and calling
osmo_tdef_get() actually casts the arg to a signed long. To end the
confusion, change default_timeout from unsigned long to long.

Change-Id: I51b9172603984839448346c9836e43c8c802fcf8
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 7ba9347..c5d4ee8 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -10,3 +10,4 @@
 libosmovty	_LAST_OSMOVTY_NODE 	Raise _LAST_OSMOVTY_NODE by introducing some RESERVED*_NODE
 libosmogsm      gsm0808_old_bss_to_new_bss_info ABI break (struct changes size), gsm0808_old_bss_to_new_bss_info_att_tlvdef symbol added
 libosmosim	osim_card_hdl		ABI + API breakage due to new struct members
+libosmocore	osmo_tdef_fsm_inst_state_chg	change default_timeout arg from unsigned long to long type (API breakage, not ABI)
diff --git a/include/osmocom/core/tdef.h b/include/osmocom/core/tdef.h
index 627ba3f..d9d2675 100644
--- a/include/osmocom/core/tdef.h
+++ b/include/osmocom/core/tdef.h
@@ -162,7 +162,7 @@
 				      __FILE__, __LINE__)
 int _osmo_tdef_fsm_inst_state_chg(struct osmo_fsm_inst *fi, uint32_t state,
 				  const struct osmo_tdef_state_timeout *timeouts_array,
-				  const struct osmo_tdef *tdefs, unsigned long default_timeout,
+				  const struct osmo_tdef *tdefs, signed long default_timeout,
 				  const char *file, int line);
 
 /*! Manage timer definitions in named groups.
diff --git a/src/tdef.c b/src/tdef.c
index 897a92f..9890f95 100644
--- a/src/tdef.c
+++ b/src/tdef.c
@@ -331,7 +331,7 @@
  */
 int _osmo_tdef_fsm_inst_state_chg(struct osmo_fsm_inst *fi, uint32_t state,
 				  const struct osmo_tdef_state_timeout *timeouts_array,
-				  const struct osmo_tdef *tdefs, unsigned long default_timeout,
+				  const struct osmo_tdef *tdefs, long default_timeout,
 				  const char *file, int line)
 {
 	const struct osmo_tdef_state_timeout *t = osmo_tdef_get_state_timeout(state, timeouts_array);