MNCC: introduce mncc_upq_enqueue() wrapper around msgb_enqueue()
This wrapper will allow us to add queue related code at one single location in the code as opposed to three locations.
This commit is contained in:
parent
7ce5e259c9
commit
434bb3f39f
|
@ -840,4 +840,10 @@ int gsm_bts_model_register(struct gsm_bts_model *model);
|
|||
struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan);
|
||||
void subscr_con_free(struct gsm_subscriber_connection *conn);
|
||||
|
||||
/* FIXME: this should go some other header file, but there is no good one */
|
||||
static inline void mncc_upq_enqueue(struct gsm_network *net, struct msgb *msg)
|
||||
{
|
||||
msgb_enqueue(&net->upqueue, msg);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1330,7 +1330,7 @@ static int mncc_recvmsg(struct gsm_network *net, struct gsm_trans *trans,
|
|||
if (!msg)
|
||||
return -ENOMEM;
|
||||
memcpy(msg->data, mncc, sizeof(struct gsm_mncc));
|
||||
msgb_enqueue(&net->upqueue, msg);
|
||||
mncc_upq_enqueue(net, msg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -443,7 +443,7 @@ static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss)
|
|||
if (rc < 0)
|
||||
goto out_free;
|
||||
msgb_free(msg);
|
||||
msgb_enqueue(&rs->receive.net->upqueue, new_msg);
|
||||
mncc_upq_enqueue(rs->receive.net, new_msg);
|
||||
break;
|
||||
|
||||
case RTP_NONE: /* if socket exists, but disabled by app */
|
||||
|
|
|
@ -214,7 +214,7 @@ int trau_mux_input(struct gsm_e1_subslot *src_e1_ss,
|
|||
}
|
||||
frame->msg_type = GSM_TCHF_FRAME;
|
||||
frame->callref = ue->callref;
|
||||
msgb_enqueue(&ue->net->upqueue, msg);
|
||||
mncc_upq_enqueue(ue->net, msg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue