mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 04:53:24 +00:00
debug: log list of subscribers upon lookup
This commit is contained in:
@@ -36,6 +36,40 @@ static int same_ue_conn(struct ue_conn_ctx *a, struct ue_conn_ctx *b)
|
||||
&& (a->conn_id == b->conn_id);
|
||||
}
|
||||
|
||||
static inline void log_subscribers(struct gsm_network *network)
|
||||
{
|
||||
if (!log_check_level(DIUCS, LOGL_DEBUG))
|
||||
return;
|
||||
|
||||
struct gsm_subscriber_connection *conn;
|
||||
int i = 0;
|
||||
llist_for_each_entry(conn, &network->subscr_conns, entry) {
|
||||
DEBUGP(DIUCS, "%3d: %s", i++, subscr_name(conn->subscr));
|
||||
switch (conn->via_iface) {
|
||||
case IFACE_IU:
|
||||
DEBUGPC(DIUCS, " Iu");
|
||||
if (conn->iu.ue_ctx) {
|
||||
DEBUGPC(DIUCS, " link %p, conn_id %d",
|
||||
conn->iu.ue_ctx->link,
|
||||
conn->iu.ue_ctx->conn_id
|
||||
);
|
||||
}
|
||||
break;
|
||||
case IFACE_A:
|
||||
DEBUGPC(DIUCS, " A");
|
||||
break;
|
||||
case IFACE_UNKNOWN:
|
||||
DEBUGPC(DIUCS, " ?");
|
||||
break;
|
||||
default:
|
||||
DEBUGPC(DIUCS, " invalid");
|
||||
break;
|
||||
}
|
||||
DEBUGPC(DIUCS, "\n");
|
||||
}
|
||||
DEBUGP(DIUCS, "subscribers registered: %d\n", i);
|
||||
}
|
||||
|
||||
/* Return an existing IuCS subscriber connection record for the given link and
|
||||
* connection IDs, or return NULL if not found. */
|
||||
static struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network,
|
||||
@@ -43,6 +77,8 @@ static struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_networ
|
||||
{
|
||||
struct gsm_subscriber_connection *conn;
|
||||
|
||||
log_subscribers(network);
|
||||
|
||||
llist_for_each_entry(conn, &network->subscr_conns, entry) {
|
||||
if (conn->via_iface != IFACE_IU)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user