Change in osmo-remsim[master]: respro_util: Add rspro_gen_ConfigClientRes() function

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 7 17:34:59 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13105 )

Change subject: respro_util: Add rspro_gen_ConfigClientRes() function
......................................................................

respro_util: Add rspro_gen_ConfigClientRes() function

Change-Id: Ib14bc617ed60c64d3b69094f30901f78cafba3b3
---
M src/rspro_util.c
M src/rspro_util.h
2 files changed, 13 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/rspro_util.c b/src/rspro_util.c
index c8f4589..7001db8 100644
--- a/src/rspro_util.c
+++ b/src/rspro_util.c
@@ -203,6 +203,18 @@
 	return pdu;
 }
 
+RsproPDU_t *rspro_gen_ConfigClientRes(e_ResultCode res)
+{
+	RsproPDU_t *pdu = CALLOC(1, sizeof(*pdu));
+	if (!pdu)
+		return NULL;
+	pdu->version = 2;
+	pdu->msg.present = RsproPDUchoice_PR_configClientRes;
+	pdu->msg.choice.configClientRes.result = res;
+
+	return pdu;
+}
+
 RsproPDU_t *rspro_gen_SetAtrReq(uint16_t client_id, uint16_t slot_nr, const uint8_t *atr,
 				unsigned int atr_len)
 {
diff --git a/src/rspro_util.h b/src/rspro_util.h
index bb2cf00..0e9a026 100644
--- a/src/rspro_util.h
+++ b/src/rspro_util.h
@@ -29,6 +29,7 @@
 RsproPDU_t *rspro_gen_RemoveMappingReq(const ClientSlot_t *client, const BankSlot_t *bank);
 RsproPDU_t *rspro_gen_RemoveMappingRes(e_ResultCode res);
 RsproPDU_t *rspro_gen_ConfigClientReq(const ClientSlot_t *client, uint32_t ip, uint16_t port);
+RsproPDU_t *rspro_gen_ConfigClientRes(e_ResultCode res);
 RsproPDU_t *rspro_gen_SetAtrReq(uint16_t client_id, uint16_t slot_nr, const uint8_t *atr,
 				unsigned int atr_len);
 RsproPDU_t *rspro_gen_TpduModem2Card(const ClientSlot_t *client, const BankSlot_t *bank,

-- 
To view, visit https://gerrit.osmocom.org/13105
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib14bc617ed60c64d3b69094f30901f78cafba3b3
Gerrit-Change-Number: 13105
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190307/004d1f7e/attachment.html>


More information about the gerrit-log mailing list