From 46caa3048d70d217462cf0bad6e197ecc28025b5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 4 Nov 2010 12:18:00 +0100 Subject: [PATCH] bsc_api: Provide the link_id in the dtap callback. --- openbsc/include/openbsc/bsc_api.h | 3 ++- openbsc/src/bsc/osmo_bsc_api.c | 2 +- openbsc/src/bsc_api.c | 7 ++++--- openbsc/src/osmo_msc.c | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/openbsc/include/openbsc/bsc_api.h b/openbsc/include/openbsc/bsc_api.h index 166ce3180..22982f0f2 100644 --- a/openbsc/include/openbsc/bsc_api.h +++ b/openbsc/include/openbsc/bsc_api.h @@ -14,7 +14,8 @@ struct bsc_api { struct msgb *msg, uint8_t chosen_encr); int (*compl_l3)(struct gsm_subscriber_connection *conn, struct msgb *msg, uint16_t chosen_channel); - void (*dtap)(struct gsm_subscriber_connection *conn, struct msgb *msg); + void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id, + struct msgb *msg); void (*assign_compl)(struct gsm_subscriber_connection *conn, uint8_t rr_cause, uint8_t chosen_channel, uint8_t encr_alg_id, uint8_t speech_mode); diff --git a/openbsc/src/bsc/osmo_bsc_api.c b/openbsc/src/bsc/osmo_bsc_api.c index f22e9a7d9..f26d6a934 100644 --- a/openbsc/src/bsc/osmo_bsc_api.c +++ b/openbsc/src/bsc/osmo_bsc_api.c @@ -35,7 +35,7 @@ static int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg return BSC_API_CONN_POL_REJECT; } -static void bsc_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg) +static void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) { } diff --git a/openbsc/src/bsc_api.c b/openbsc/src/bsc_api.c index df806ba73..3abf4ba01 100644 --- a/openbsc/src/bsc_api.c +++ b/openbsc/src/bsc_api.c @@ -232,7 +232,8 @@ int bsc_upqueue(struct gsm_network *net) return work; } -static void dispatch_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg) +static void dispatch_dtap(struct gsm_subscriber_connection *conn, + uint8_t link_id, struct msgb *msg) { struct bsc_api *api = msg->lchan->ts->trx->bts->network->bsc_api; struct gsm48_hdr *gh; @@ -280,7 +281,7 @@ static void dispatch_dtap(struct gsm_subscriber_connection *conn, struct msgb *m /* default case */ if (api->dtap) - api->dtap(conn, msg); + api->dtap(conn, link_id, msg); } int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id) @@ -297,7 +298,7 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id) if (lchan->conn) { - dispatch_dtap(lchan->conn, msg); + dispatch_dtap(lchan->conn, link_id, msg); } else { rc = BSC_API_CONN_POL_REJECT; lchan->conn = subscr_con_allocate(msg->lchan); diff --git a/openbsc/src/osmo_msc.c b/openbsc/src/osmo_msc.c index 0ed973b10..c982fd04e 100644 --- a/openbsc/src/osmo_msc.c +++ b/openbsc/src/osmo_msc.c @@ -52,7 +52,7 @@ static int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg return BSC_API_CONN_POL_ACCEPT; } -static void msc_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg) +static void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) { gsm0408_dispatch(conn, msg); }