move ipa_client_conn_send_rspro() into remsim_client_fsm.c

Change-Id: I805e7dee0e3dd5a591d215ad340da356b19d03dd
This commit is contained in:
Harald Welte 2018-10-14 20:07:59 +02:00
parent fc0ba94dd6
commit 7f0e82f9d4
3 changed files with 15 additions and 30 deletions

View File

@ -16,21 +16,6 @@
#include "rspro_util.h"
#include "client.h"
static void push_and_send(struct ipa_client_conn *ipa, struct msgb *msg_tx)
{
ipa_prepend_header_ext(msg_tx, IPAC_PROTO_EXT_RSPRO);
ipa_msg_push_header(msg_tx, IPAC_PROTO_OSMO);
ipa_client_conn_send(ipa, msg_tx);
/* msg_tx is now queued and will be freed. */
}
void ipa_client_conn_send_rspro(struct ipa_client_conn *ipa, RsproPDU_t *rspro)
{
struct msgb *msg = rspro_enc_msg(rspro);
OSMO_ASSERT(msg);
push_and_send(ipa, msg);
}
static int bankd_handle_msg(struct bankd_client *bc, struct msgb *msg)
{
RsproPDU_t *pdu = rspro_dec_msg(msg);

View File

@ -17,6 +17,21 @@
#define S(x) (1 << (x))
static void push_and_send(struct ipa_client_conn *ipa, struct msgb *msg_tx)
{
ipa_prepend_header_ext(msg_tx, IPAC_PROTO_EXT_RSPRO);
ipa_msg_push_header(msg_tx, IPAC_PROTO_OSMO);
ipa_client_conn_send(ipa, msg_tx);
/* msg_tx is now queued and will be freed. */
}
void ipa_client_conn_send_rspro(struct ipa_client_conn *ipa, RsproPDU_t *rspro)
{
struct msgb *msg = rspro_enc_msg(rspro);
OSMO_ASSERT(msg);
push_and_send(ipa, msg);
}
static void bankd_updown_cb(struct ipa_client_conn *conn, int up)
{
struct bankd_client *bc = conn->data;

View File

@ -506,21 +506,6 @@ static void signal_handler(int signal)
/** remsim_client **/
static void push_and_send(struct ipa_client_conn *ipa, struct msgb *msg_tx)
{
ipa_prepend_header_ext(msg_tx, IPAC_PROTO_EXT_RSPRO);
ipa_msg_push_header(msg_tx, IPAC_PROTO_OSMO);
ipa_client_conn_send(ipa, msg_tx);
/* msg_tx is now queued and will be freed. */
}
void ipa_client_conn_send_rspro(struct ipa_client_conn *ipa, RsproPDU_t *rspro)
{
struct msgb *msg = rspro_enc_msg(rspro);
OSMO_ASSERT(msg);
push_and_send(ipa, msg);
}
static int bankd_handle_tpduCardToModem(struct bankd_client *bc, RsproPDU_t *pdu)
{
OSMO_ASSERT(pdu);