aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-15 14:07:40 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-02-19 17:11:29 +0100
commitec42264113fcdcb1ef7c4ee237285ece7006909a (patch)
tree4c8647e27f0def7db32ee1d9dfe7a47d658b923f
parent35ba85c37d6fca81fc54dc4436d28030a8b70c3a (diff)
HO: clearly mark conn penalty timer member for hodec2
The conn's penalty timers will be used only for handover decision 2, make it clear by a sub-struct. hodec2 will also initialize the penalty timer list on demand only, so no need to always initialize. Change-Id: Ie6c2bc2b10dc424dfd94a9e11a9a62f51c48aa10
-rw-r--r--include/osmocom/bsc/gsm_data.h4
-rw-r--r--src/libbsc/bsc_api.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 65fb32b6d..bf8759575 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -115,7 +115,9 @@ struct gsm_subscriber_connection {
struct llist_head ho_dtap_cache;
unsigned int ho_dtap_cache_len;
- struct penalty_timers *ho_penalty_timers;
+ struct {
+ struct penalty_timers *penalty_timers;
+ } hodec2;
/* "Codec List (MSC Preferred)" as received by the BSSAP Assignment Request. 3GPP 48.008
* 3.2.2.103 says:
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 5f452180e..2dc7b9a69 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -278,7 +278,6 @@ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan *lcha
conn->lchan = lchan;
lchan->conn = conn;
INIT_LLIST_HEAD(&conn->ho_dtap_cache);
- conn->ho_penalty_timers = penalty_timers_init(conn);
conn->sccp.conn_id = -1;
llist_add_tail(&conn->entry, &net->subscr_conns);
return conn;
@@ -353,7 +352,7 @@ void bsc_subscr_con_free(struct gsm_subscriber_connection *conn)
/* drop pending messages */
ho_dtap_cache_flush(conn, 0);
- penalty_timers_free(&conn->ho_penalty_timers);
+ penalty_timers_free(&conn->hodec2.penalty_timers);
llist_del(&conn->entry);
talloc_free(conn);