rsl: Rename the reason to release_mode and use the enum value
The API with 0 and 1 as legal values is hard to understand. Use the
recently introduced enum values instead.
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index f7e2e2a..c34492e 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -67,7 +67,8 @@
int abis_rsl_rcvmsg(struct msgb *msg);
uint64_t str_to_imsi(const char *imsi_str);
-int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id, uint8_t reason);
+int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id,
+ enum rsl_rel_mode release_mode);
int rsl_lchan_set_state(struct gsm_lchan *lchan, int);
diff --git a/openbsc/include/openbsc/chan_alloc.h b/openbsc/include/openbsc/chan_alloc.h
index f1c890e..f2d3c78 100644
--- a/openbsc/include/openbsc/chan_alloc.h
+++ b/openbsc/include/openbsc/chan_alloc.h
@@ -46,7 +46,7 @@
void lchan_reset(struct gsm_lchan *lchan);
/* Release the given lchan */
-int lchan_release(struct gsm_lchan *lchan, int sacch_deact, int release_mode);
+int lchan_release(struct gsm_lchan *lchan, int sacch_deact, enum rsl_rel_mode release_mode);
struct load_counter {
unsigned int total;
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index fda3b09..f81280f 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -196,8 +196,8 @@
uint8_t sapis[8];
int sacch_deact;
- /** GSM 08.58 9.3.20 */
- int release_mode;
+ /* Release handling */
+ enum rsl_rel_mode release_mode;
struct {
uint32_t bound_ip;