aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-05-30 14:12:48 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-12-01 03:37:43 +0100
commit3d2d487410377532030e328adeff1a224a884fb8 (patch)
tree98f2098ebe85cedd37c24f0b127f5469776aa4e6 /src
parent6321015c6cd78a2e63f2c9246df98f43a734ee54 (diff)
HO: Add a penalty timer list to the subscriber connection entity
This penalty timer is used to temporarily block cells where handover or assignment failed or where handover is not allowed. This is usefull to prevent repeated handover attempts to broken cells or cells that have limited allowed distance.
Diffstat (limited to 'src')
-rw-r--r--src/libbsc/bsc_api.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 045068f24..8ac822e93 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -249,6 +249,7 @@ struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan)
conn->lchan = lchan;
conn->bts = lchan->ts->trx->bts;
lchan->conn = conn;
+ INIT_LLIST_HEAD(&conn->ho_penalty_timers);
llist_add_tail(&conn->entry, &sub_connections);
return conn;
}
@@ -256,6 +257,8 @@ struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan)
/* TODO: move subscriber put here... */
void subscr_con_free(struct gsm_subscriber_connection *conn)
{
+ struct ho_penalty_timer *penalty;
+
if (!conn)
return;
@@ -281,6 +284,14 @@ void subscr_con_free(struct gsm_subscriber_connection *conn)
conn->secondary_lchan->conn = NULL;
}
+ /* flush handover penalty timers */
+ while (!llist_empty(&conn->ho_penalty_timers)) {
+ penalty = llist_entry(conn->ho_penalty_timers.next,
+ struct ho_penalty_timer, entry);
+ llist_del(&penalty->entry);
+ talloc_free(penalty);
+ }
+
llist_del(&conn->entry);
talloc_free(conn);
}