move ipa_client_conn_send_rspro() into remsim_client_fsm.c

Change-Id: I805e7dee0e3dd5a591d215ad340da356b19d03dd
diff --git a/src/remsim_client_fsm.c b/src/remsim_client_fsm.c
index 0b514e6..84f9f4f 100644
--- a/src/remsim_client_fsm.c
+++ b/src/remsim_client_fsm.c
@@ -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;