From d48bfe0e93bc1d420bbd1dc45490487240b83a51 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 1 May 2010 15:22:40 +0800 Subject: bssap: Store the link_id in the new msgb->cb. Work with a new version of libosmocore that gets rid of additional pointers. --- openbsc/src/bssap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c index 73d225cec..1ec224c9f 100644 --- a/openbsc/src/bssap.c +++ b/openbsc/src/bssap.c @@ -40,6 +40,8 @@ #define BSSMAP_MSG_SIZE 512 #define BSSMAP_MSG_HEADROOM 128 +#define LINK_ID_CB 0 + static void bts_queue_send(struct msgb *msg, int link_id); static void bssmap_free_secondary(struct bss_sccp_connection_data *data); @@ -1236,7 +1238,7 @@ static void bts_queue_send(struct msgb *msg, int link_id) if (msg->lchan->sapis[link_id & 0x7] != LCHAN_SAPI_UNUSED) { rsl_data_request(msg, link_id); } else { - msg->smsh = (unsigned char*) link_id; + msg->cb[LINK_ID_CB] = link_id; msgb_enqueue(&data->gsm_queue, msg); ++data->gsm_queue_size; @@ -1252,7 +1254,7 @@ static void bts_queue_send(struct msgb *msg, int link_id) LOGP(DMSC, LOGL_DEBUG, "Queueing GSM0408 message on %p. Queue size: %d\n", data->sccp, data->gsm_queue_size + 1); - msg->smsh = (unsigned char*) link_id; + msg->cb[LINK_ID_CB] = link_id; msgb_enqueue(&data->gsm_queue, msg); ++data->gsm_queue_size; } @@ -1278,7 +1280,7 @@ void bts_send_queued(struct bss_sccp_connection_data *data) while (!llist_empty(&data->gsm_queue)) { /* this is not allowed to fail */ msg = msgb_dequeue(&data->gsm_queue); - rsl_data_request(msg, (int) msg->smsh); + rsl_data_request(msg, msg->cb[LINK_ID_CB]); } data->gsm_queue_size = 0; @@ -1300,7 +1302,7 @@ void bts_unblock_queue(struct bss_sccp_connection_data *data) /* now queue them again to send RSL establish and such */ while (!llist_empty(&head)) { msg = msgb_dequeue(&head); - bts_queue_send(msg, (int) msg->smsh); + bts_queue_send(msg, msg->cb[LINK_ID_CB]); } } -- cgit v1.2.3