rsl: Call the release function with the enum name and not the number
Done with the semantic patch:
@rule1@
expression E;
expression F;
@@
- lchan_release(E, F, 1);
+ lchan_release(E, F, RSL_REL_LOCAL_END);
@rule2@
expression E;
expression F;
@@
- lchan_release(E, F, 0);
+ lchan_release(E, F, RSL_REL_NORMAL);
diff --git a/openbsc/src/libbsc/handover_logic.c b/openbsc/src/libbsc/handover_logic.c
index 5ce3301..d2cd5ef 100644
--- a/openbsc/src/libbsc/handover_logic.c
+++ b/openbsc/src/libbsc/handover_logic.c
@@ -167,7 +167,7 @@
conn->ho_lchan = NULL;
if (free_lchan)
- lchan_release(ho->new_lchan, 0, 1);
+ lchan_release(ho->new_lchan, 0, RSL_REL_LOCAL_END);
osmo_timer_del(&ho->T3103);
llist_del(&ho->list);
@@ -185,7 +185,7 @@
ho->new_lchan->conn->ho_lchan = NULL;
ho->new_lchan->conn = NULL;
- lchan_release(ho->new_lchan, 0, 1);
+ lchan_release(ho->new_lchan, 0, RSL_REL_LOCAL_END);
llist_del(&ho->list);
talloc_free(ho);
}
@@ -276,7 +276,7 @@
ho->old_lchan->conn = NULL;
rsl_lchan_set_state(ho->old_lchan, LCHAN_S_INACTIVE);
- lchan_release(ho->old_lchan, 0, 1);
+ lchan_release(ho->old_lchan, 0, RSL_REL_LOCAL_END);
/* do something to re-route the actual speech frames ! */
@@ -306,7 +306,7 @@
/* release the channel and forget about it */
ho->new_lchan->conn->ho_lchan = NULL;
ho->new_lchan->conn = NULL;
- lchan_release(ho->new_lchan, 0, 1);
+ lchan_release(ho->new_lchan, 0, RSL_REL_LOCAL_END);
talloc_free(ho);