handover: Attempt to use the same gsm_subscriber_conn for new/old channel
The transaction should not know on which lchan we are operating
as this can change due handover. Add untested code to share the
subscriber connection of the new and old lchan and move the pointer
in case of success/failure. Also on a clear command we will free
any resources allocated...
This code is not tested and needs to be debugged, but it should
have the right structure. I am going to fix a potential memleak
in the next commit.
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 491cca1..e03ad3a 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -231,6 +231,7 @@
/* back pointers */
int in_release;
struct gsm_lchan *lchan;
+ struct gsm_lchan *ho_lchan;
struct gsm_bts *bts;
};
diff --git a/openbsc/include/openbsc/transaction.h b/openbsc/include/openbsc/transaction.h
index 90a008b..0ad7504 100644
--- a/openbsc/include/openbsc/transaction.h
+++ b/openbsc/include/openbsc/transaction.h
@@ -69,8 +69,4 @@
int trans_assign_trans_id(struct gsm_subscriber *subscr,
u_int8_t protocol, u_int8_t ti_flag);
-/* update all transactions to use a different LCHAN, e.g.
- * after handover has succeeded */
-int trans_lchan_change(struct gsm_subscriber_connection *conn_old,
- struct gsm_subscriber_connection *conn_new);
#endif