diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h index 02d67f762..fd0b89d79 100644 --- a/openbsc/include/openbsc/gsm_04_08.h +++ b/openbsc/include/openbsc/gsm_04_08.h @@ -19,10 +19,10 @@ struct amr_mode; #define GSM48_ALLOC_SIZE 2048 #define GSM48_ALLOC_HEADROOM 256 -static inline struct msgb *gsm48_msgb_alloc(void) +static inline struct msgb *gsm48_msgb_alloc_name(const char *name) { return msgb_alloc_headroom(GSM48_ALLOC_SIZE, GSM48_ALLOC_HEADROOM, - "GSM 04.08"); + name); } static inline int get_radio_link_timeout(struct gsm48_cell_options *cell_options) diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index 6cad651a5..955133562 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -393,7 +393,7 @@ static void gbproxy_acquire_imsi(struct gbproxy_peer *peer, struct msgb *idreq_msg; /* Send IDENT REQ */ - idreq_msg = gsm48_msgb_alloc(); + idreq_msg = gsm48_msgb_alloc_name("GSM 04.08 ACQ IMSI"); gprs_put_identity_req(idreq_msg, GSM_MI_TYPE_IMSI); gbproxy_gsm48_to_peer(peer, link_info, bvci, idreq_msg); } @@ -405,7 +405,7 @@ static void gbproxy_tx_detach_acc(struct gbproxy_peer *peer, struct msgb *detacc_msg; /* Send DETACH ACC */ - detacc_msg = gsm48_msgb_alloc(); + detacc_msg = gsm48_msgb_alloc_name("GSM 04.08 DET ACC"); gprs_put_mo_detach_acc(detacc_msg); gbproxy_gsm48_to_peer(peer, link_info, bvci, detacc_msg); } diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 115e898cc..7d3e3de75 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -199,7 +199,7 @@ static int _tx_status(struct msgb *msg, uint8_t cause, static int gsm48_tx_gmm_status(struct sgsn_mm_ctx *mmctx, uint8_t cause) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 GMM STATUS"); mmctx2msgid(msg, mmctx); return _tx_status(msg, cause, mmctx, 0); @@ -207,7 +207,7 @@ static int gsm48_tx_gmm_status(struct sgsn_mm_ctx *mmctx, uint8_t cause) static int gsm48_tx_sm_status(struct sgsn_mm_ctx *mmctx, uint8_t cause) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 SM STATUS"); mmctx2msgid(msg, mmctx); return _tx_status(msg, cause, mmctx, 1); @@ -238,7 +238,7 @@ static int _tx_detach_req(struct msgb *msg, uint8_t detach_type, uint8_t cause, static int gsm48_tx_gmm_detach_req(struct sgsn_mm_ctx *mmctx, uint8_t detach_type, uint8_t cause) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 DET REQ"); mmctx2msgid(msg, mmctx); return _tx_detach_req(msg, detach_type, cause, mmctx); @@ -247,7 +247,7 @@ static int gsm48_tx_gmm_detach_req(struct sgsn_mm_ctx *mmctx, static int gsm48_tx_gmm_detach_req_oldmsg(struct msgb *oldmsg, uint8_t detach_type, uint8_t cause) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 DET OLD"); gmm_copy_id(msg, oldmsg); return _tx_detach_req(msg, detach_type, cause, NULL); @@ -279,7 +279,7 @@ static struct gsm48_qos default_qos = { /* Chapter 9.4.2: Attach accept */ static int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ATT ACK"); struct gsm48_hdr *gh; struct gsm48_attach_ack *aa; uint8_t *mid; @@ -350,14 +350,14 @@ static int _tx_gmm_att_rej(struct msgb *msg, uint8_t gmm_cause, static int gsm48_tx_gmm_att_rej_oldmsg(const struct msgb *old_msg, uint8_t gmm_cause) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ATT REJ OLD"); gmm_copy_id(msg, old_msg); return _tx_gmm_att_rej(msg, gmm_cause, NULL); } static int gsm48_tx_gmm_att_rej(struct sgsn_mm_ctx *mm, uint8_t gmm_cause) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ATT REJ"); mmctx2msgid(msg, mm); return _tx_gmm_att_rej(msg, gmm_cause, mm); } @@ -382,7 +382,7 @@ static int _tx_detach_ack(struct msgb *msg, uint8_t force_stby, static int gsm48_tx_gmm_det_ack(struct sgsn_mm_ctx *mm, uint8_t force_stby) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 DET ACK"); mmctx2msgid(msg, mm); return _tx_detach_ack(msg, force_stby, mm); @@ -390,7 +390,7 @@ static int gsm48_tx_gmm_det_ack(struct sgsn_mm_ctx *mm, uint8_t force_stby) static int gsm48_tx_gmm_det_ack_oldmsg(struct msgb *oldmsg, uint8_t force_stby) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 DET ACK OLD"); gmm_copy_id(msg, oldmsg); return _tx_detach_ack(msg, force_stby, NULL); @@ -399,7 +399,7 @@ static int gsm48_tx_gmm_det_ack_oldmsg(struct msgb *oldmsg, uint8_t force_stby) /* Transmit Chapter 9.4.12 Identity Request */ static int gsm48_tx_gmm_id_req(struct sgsn_mm_ctx *mm, uint8_t id_type) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ID REQ"); struct gsm48_hdr *gh; LOGMMCTXP(LOGL_DEBUG, mm, "<- GPRS IDENTITY REQUEST: mi_type=%s\n", @@ -420,7 +420,7 @@ static int gsm48_tx_gmm_id_req(struct sgsn_mm_ctx *mm, uint8_t id_type) static int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm, uint8_t *rand, uint8_t key_seq, uint8_t algo) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 AUTH CIPH REQ"); struct gsm48_hdr *gh; struct gsm48_auth_ciph_req *acreq; uint8_t *m_rand, *m_cksn; @@ -458,7 +458,7 @@ static int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm, uint8_t *rand, /* Section 9.4.11: Authentication and Ciphering Reject */ static int gsm48_tx_gmm_auth_ciph_rej(struct sgsn_mm_ctx *mm) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 AUTH CIPH REJ"); struct gsm48_hdr *gh; LOGMMCTXP(LOGL_NOTICE, mm, "<- GPRS AUTH AND CIPH REJECT\n"); @@ -1020,7 +1020,7 @@ static int gsm48_rx_gmm_det_req(struct sgsn_mm_ctx *ctx, struct msgb *msg) /* Chapter 9.4.15: Routing area update accept */ static int gsm48_tx_gmm_ra_upd_ack(struct sgsn_mm_ctx *mm) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 UPD ACK"); struct gsm48_hdr *gh; struct gsm48_ra_upd_ack *rua; uint8_t *mid; @@ -1067,7 +1067,7 @@ static int gsm48_tx_gmm_ra_upd_ack(struct sgsn_mm_ctx *mm) /* Chapter 9.4.17: Routing area update reject */ static int gsm48_tx_gmm_ra_upd_rej(struct msgb *old_msg, uint8_t cause) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 RA UPD REJ"); struct gsm48_hdr *gh; LOGP(DMM, LOGL_NOTICE, "<- ROUTING AREA UPDATE REJECT\n"); @@ -1502,7 +1502,7 @@ static void msgb_put_pdp_addr_ppp(struct msgb *msg) /* Section 9.5.2: Ativate PDP Context Accept */ int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 PDP ACC"); struct gsm48_hdr *gh; uint8_t transaction_id = pdp->ti ^ 0x8; /* flip */ @@ -1546,7 +1546,7 @@ int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp) int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid, uint8_t cause, uint8_t pco_len, uint8_t *pco_v) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 PDP REJ"); struct gsm48_hdr *gh; uint8_t transaction_id = tid ^ 0x8; /* flip */ @@ -1569,7 +1569,7 @@ int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid, static int _gsm48_tx_gsm_deact_pdp_req(struct sgsn_mm_ctx *mm, uint8_t tid, uint8_t sm_cause) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 PDP DET REQ"); struct gsm48_hdr *gh; uint8_t transaction_id = tid ^ 0x8; /* flip */ @@ -1595,7 +1595,7 @@ int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause) /* Section 9.5.9: Deactivate PDP Context Accept */ static int _gsm48_tx_gsm_deact_pdp_acc(struct sgsn_mm_ctx *mm, uint8_t tid) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 PDP DET ACC"); struct gsm48_hdr *gh; uint8_t transaction_id = tid ^ 0x8; /* flip */ diff --git a/openbsc/src/libbsc/gsm_04_08_utils.c b/openbsc/src/libbsc/gsm_04_08_utils.c index 4901912f5..8c6dbef9b 100644 --- a/openbsc/src/libbsc/gsm_04_08_utils.c +++ b/openbsc/src/libbsc/gsm_04_08_utils.c @@ -224,7 +224,7 @@ static void mr_config_for_ms(struct gsm_lchan *lchan, struct msgb *msg) /* 7.1.7 and 9.1.7: RR CHANnel RELease */ int gsm48_send_rr_release(struct gsm_lchan *lchan) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 RR REL"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); uint8_t *cause; @@ -314,7 +314,7 @@ int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, /* Chapter 9.1.9: Ciphering Mode Command */ int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CIPH"); struct gsm48_hdr *gh; uint8_t ciph_mod_set; @@ -410,7 +410,7 @@ int gsm48_multirate_config(uint8_t *lv, struct amr_multirate_conf *mr, struct am int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan, uint8_t power_command, uint8_t ho_ref) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 HO CMD"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); struct gsm48_ho_cmd *ho = (struct gsm48_ho_cmd *) msgb_put(msg, sizeof(*ho)); @@ -449,7 +449,7 @@ int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan, /* Chapter 9.1.2: Assignment Command */ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t power_command) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ASS CMD"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); struct gsm48_ass_cmd *ass = (struct gsm48_ass_cmd *) msgb_put(msg, sizeof(*ass)); @@ -490,7 +490,7 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, /* 9.1.5 Channel mode modify: Modify the mode on the MS side */ int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, uint8_t mode) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CHN MOD"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); struct gsm48_chan_mode_modify *cmm = (struct gsm48_chan_mode_modify *) msgb_put(msg, sizeof(*cmm)); @@ -650,7 +650,7 @@ struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value) struct msgb *msg; struct gsm48_hdr *gh; - msg = gsm48_msgb_alloc(); + msg = gsm48_msgb_alloc_name("GSM 04.08 SERV REJ"); if (!msg) return NULL; @@ -667,7 +667,7 @@ struct msgb *gsm48_create_loc_upd_rej(uint8_t cause) struct gsm48_hdr *gh; struct msgb *msg; - msg = gsm48_msgb_alloc(); + msg = gsm48_msgb_alloc_name("GSM 04.08 LOC UPD REJ"); if (!msg) return NULL; @@ -681,7 +681,7 @@ struct msgb *gsm48_create_loc_upd_rej(uint8_t cause) /* 9.2.5 CM service accept */ int gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 SERV ACK"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); msg->lchan = conn->lchan; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 9d7e2aaad..d9d739032 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -458,7 +458,7 @@ int gsm0408_loc_upd_rej(struct gsm_subscriber_connection *conn, uint8_t cause) static int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn) { struct gsm_bts *bts = conn->bts; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 LOC UPD ACC"); struct gsm48_hdr *gh; struct gsm48_loc_area_id *lai; uint8_t *mid; @@ -494,7 +494,7 @@ static int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn) /* Transmit Chapter 9.2.10 Identity Request */ static int mm_tx_identity_req(struct gsm_subscriber_connection *conn, uint8_t id_type) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ID REQ"); struct gsm48_hdr *gh; msg->lchan = conn->lchan; @@ -707,7 +707,7 @@ static uint8_t bcdify(uint8_t value) /* Section 9.2.15a */ int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 MM INF"); struct gsm48_hdr *gh; struct gsm_network *net = conn->bts->network; struct gsm_bts *bts = conn->bts; @@ -855,7 +855,7 @@ int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn) /* Section 9.2.2 */ int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand, int key_seq) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 AUTH REQ"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); struct gsm48_auth_req *ar = (struct gsm48_auth_req *) msgb_put(msg, sizeof(*ar)); @@ -1261,7 +1261,7 @@ static int gsm0408_rcv_rr(struct gsm_subscriber_connection *conn, struct msgb *m int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, uint8_t apdu_id, uint8_t apdu_len, const uint8_t *apdu) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 APP INF"); struct gsm48_hdr *gh; msg->lchan = conn->lchan; @@ -1300,7 +1300,7 @@ static void new_cc_state(struct gsm_trans *trans, int state) static int gsm48_cc_tx_status(struct gsm_trans *trans, void *arg) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC STATUS"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); uint8_t *cause, *call_state; @@ -1320,7 +1320,7 @@ static int gsm48_cc_tx_status(struct gsm_trans *trans, void *arg) static int gsm48_tx_simple(struct gsm_subscriber_connection *conn, uint8_t pdisc, uint8_t msg_type) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 TX SIMPLE"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); msg->lchan = conn->lchan; @@ -1943,7 +1943,7 @@ static int gsm48_cc_rx_setup(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC STUP"); struct gsm48_hdr *gh; struct gsm_mncc *setup = arg; int rc, trans_id; @@ -2067,7 +2067,7 @@ static int gsm48_cc_rx_call_conf(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_call_proc(struct gsm_trans *trans, void *arg) { struct gsm_mncc *proceeding = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC PROC"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_CALL_PROC; @@ -2129,7 +2129,7 @@ static int gsm48_cc_rx_alerting(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_alerting(struct gsm_trans *trans, void *arg) { struct gsm_mncc *alerting = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC ALERT"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_ALERTING; @@ -2152,7 +2152,7 @@ static int gsm48_cc_tx_alerting(struct gsm_trans *trans, void *arg) static int gsm48_cc_tx_progress(struct gsm_trans *trans, void *arg) { struct gsm_mncc *progress = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC PROGRESS"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_PROGRESS; @@ -2169,7 +2169,7 @@ static int gsm48_cc_tx_progress(struct gsm_trans *trans, void *arg) static int gsm48_cc_tx_connect(struct gsm_trans *trans, void *arg) { struct gsm_mncc *connect = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSN 04.08 CC CON"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_CONNECT; @@ -2258,7 +2258,7 @@ static int gsm48_cc_rx_connect_ack(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_connect_ack(struct gsm_trans *trans, void *arg) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC CON ACK"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_CONNECT_ACK; @@ -2324,7 +2324,7 @@ static struct gsm_mncc_cause default_cause = { static int gsm48_cc_tx_disconnect(struct gsm_trans *trans, void *arg) { struct gsm_mncc *disc = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC DISC"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_DISCONNECT; @@ -2415,7 +2415,7 @@ static int gsm48_cc_rx_release(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_release(struct gsm_trans *trans, void *arg) { struct gsm_mncc *rel = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC REL"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_RELEASE; @@ -2505,7 +2505,7 @@ static int gsm48_cc_rx_release_compl(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_release_compl(struct gsm_trans *trans, void *arg) { struct gsm_mncc *rel = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC REL COMPL"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); int ret; @@ -2561,7 +2561,7 @@ static int gsm48_cc_rx_facility(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_facility(struct gsm_trans *trans, void *arg) { struct gsm_mncc *fac = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC FAC"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_FACILITY; @@ -2583,7 +2583,7 @@ static int gsm48_cc_rx_hold(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_hold_ack(struct gsm_trans *trans, void *arg) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC HLD ACK"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_HOLD_ACK; @@ -2594,7 +2594,7 @@ static int gsm48_cc_tx_hold_ack(struct gsm_trans *trans, void *arg) static int gsm48_cc_tx_hold_rej(struct gsm_trans *trans, void *arg) { struct gsm_mncc *hold_rej = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC HLD REJ"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_HOLD_REJ; @@ -2620,7 +2620,7 @@ static int gsm48_cc_rx_retrieve(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_retrieve_ack(struct gsm_trans *trans, void *arg) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC RETR ACK"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_RETR_ACK; @@ -2631,7 +2631,7 @@ static int gsm48_cc_tx_retrieve_ack(struct gsm_trans *trans, void *arg) static int gsm48_cc_tx_retrieve_rej(struct gsm_trans *trans, void *arg) { struct gsm_mncc *retrieve_rej = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC RETR REJ"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_RETR_REJ; @@ -2668,7 +2668,7 @@ static int gsm48_cc_rx_start_dtmf(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_start_dtmf_ack(struct gsm_trans *trans, void *arg) { struct gsm_mncc *dtmf = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 DTMF ACK"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_START_DTMF_ACK; @@ -2683,7 +2683,7 @@ static int gsm48_cc_tx_start_dtmf_ack(struct gsm_trans *trans, void *arg) static int gsm48_cc_tx_start_dtmf_rej(struct gsm_trans *trans, void *arg) { struct gsm_mncc *dtmf = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 DTMF REJ"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_START_DTMF_REJ; @@ -2699,7 +2699,7 @@ static int gsm48_cc_tx_start_dtmf_rej(struct gsm_trans *trans, void *arg) static int gsm48_cc_tx_stop_dtmf_ack(struct gsm_trans *trans, void *arg) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 DTMF STP ACK"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_STOP_DTMF_ACK; @@ -2743,7 +2743,7 @@ static int gsm48_cc_rx_modify(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_modify(struct gsm_trans *trans, void *arg) { struct gsm_mncc *modify = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC MOD"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_MODIFY; @@ -2786,7 +2786,7 @@ static int gsm48_cc_rx_modify_complete(struct gsm_trans *trans, struct msgb *msg static int gsm48_cc_tx_modify_complete(struct gsm_trans *trans, void *arg) { struct gsm_mncc *modify = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC MOD COMPL"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_MODIFY_COMPL; @@ -2833,7 +2833,7 @@ static int gsm48_cc_rx_modify_reject(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_modify_reject(struct gsm_trans *trans, void *arg) { struct gsm_mncc *modify = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC MOD REJ"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_MODIFY_REJECT; @@ -2851,7 +2851,7 @@ static int gsm48_cc_tx_modify_reject(struct gsm_trans *trans, void *arg) static int gsm48_cc_tx_notify(struct gsm_trans *trans, void *arg) { struct gsm_mncc *notify = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC NOT"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_NOTIFY; @@ -2881,7 +2881,7 @@ static int gsm48_cc_rx_notify(struct gsm_trans *trans, struct msgb *msg) static int gsm48_cc_tx_userinfo(struct gsm_trans *trans, void *arg) { struct gsm_mncc *user = arg; - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USR INFO"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); gh->msg_type = GSM48_MT_CC_USER_INFO; diff --git a/openbsc/src/libmsc/gsm_04_80.c b/openbsc/src/libmsc/gsm_04_80.c index b30f9ee5f..f1d75f20d 100644 --- a/openbsc/src/libmsc/gsm_04_80.c +++ b/openbsc/src/libmsc/gsm_04_80.c @@ -65,7 +65,7 @@ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, const char *response_text, const struct ussd_request *req) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USSD RSP"); struct gsm48_hdr *gh; uint8_t *ptr8; int response_len; @@ -113,7 +113,7 @@ int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, const struct ussd_request *req) { - struct msgb *msg = gsm48_msgb_alloc(); + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REJ"); struct gsm48_hdr *gh; /* First insert the problem code */ @@ -163,7 +163,7 @@ int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn) struct gsm48_hdr *gh; struct msgb *msg; - msg = gsm48_msgb_alloc(); + msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REL COMPL"); if (!msg) return -1; diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index 2d2507ede..a60940d22 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -473,7 +473,7 @@ static int dtap_rcvmsg(struct osmo_bsc_sccp_con *conn, LOGP(DMSC, LOGL_INFO, "Rx MSC DTAP, SAPI: %u CHAN: %u\n", header->link_id & 0x07, header->link_id & 0xC0); /* forward the data */ - gsm48 = gsm48_msgb_alloc(); + gsm48 = gsm48_msgb_alloc_name("GSM 04.08 DTAP RCV"); if (!gsm48) { LOGP(DMSC, LOGL_ERROR, "Allocation of the message failed.\n"); return -1;