This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/3341
safer osmo_sccp_make_addr_pc_ssn(): clear all values
Make sure that all values of the resulting sccp_addr are cleared to obtain a
clean PC+SSN address. Before this, gt and ip remained unset/random, e.g. in
osmo_sccp_tx_unitdata_ranap()
Change-Id: I37395169d364050e45e99793c495a9848a4f8601
---
M src/sccp_helpers.c
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/41/3341/1
diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c
index 76a7c1c..ad0755f 100644
--- a/src/sccp_helpers.c
+++ b/src/sccp_helpers.c
@@ -38,10 +38,12 @@
void osmo_sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr, uint32_t pc, uint32_t ssn)
{
- addr->presence = OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC;
- addr->ri = OSMO_SCCP_RI_SSN_PC;
- addr->ssn = ssn;
- addr->pc = pc;
+ *addr = (struct osmo_sccp_addr){
+ .presence = OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC,
+ .ri = OSMO_SCCP_RI_SSN_PC,
+ .ssn = ssn,
+ .pc = pc,
+ };
}
int osmo_sccp_tx_unitdata(struct osmo_sccp_user *scu,
--
To view, visit https://gerrit.osmocom.org/3341
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37395169d364050e45e99793c495a9848a4f8601
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>