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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/24964 )
Change subject: gbproxy_ctrl: Fix crash in nsvc-state ctrl command
......................................................................
gbproxy_ctrl: Fix crash in nsvc-state ctrl command
ctrl_nsvc_state_cb() expects us to pass a struct nsvc_cb_data so do that
instead of passing only the ctrl_cmd.
Related: OS#5200, SYS#5542
Change-Id: I8bc67cc9bc90dab9cfca30b062d1d78897aa1e51
---
M src/gb_proxy_ctrl.c
1 file changed, 16 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/gb_proxy_ctrl.c b/src/gb_proxy_ctrl.c
index 35ef81b..99dcbe1 100644
--- a/src/gb_proxy_ctrl.c
+++ b/src/gb_proxy_ctrl.c
@@ -64,15 +64,27 @@
/* NS-VCs for SGSN */
hash_for_each(cfg->sgsn_nses, i, nse_peer, list) {
nse = gprs_ns2_nse_by_nsei(nsi, nse_peer->nsei);
- if (nse)
- gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, cmd);
+ if (nse) {
+ struct nsvc_cb_data cb_data = {
+ .cmd = cmd,
+ .nsei = nse_peer->nsei,
+ .is_sgsn = true,
+ };
+ gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, &cb_data);
+ }
}
/* NS-VCs for BSS peers */
hash_for_each(cfg->bss_nses, i, nse_peer, list) {
nse = gprs_ns2_nse_by_nsei(nsi, nse_peer->nsei);
- if (nse)
- gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, cmd);
+ if (nse) {
+ struct nsvc_cb_data cb_data = {
+ .cmd = cmd,
+ .nsei = nse_peer->nsei,
+ .is_sgsn = true,
+ };
+ gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, &cb_data);
+ }
}
return CTRL_CMD_REPLY;
--
To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/24964
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I8bc67cc9bc90dab9cfca30b062d1d78897aa1e51
Gerrit-Change-Number: 24964
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210727/5b35f68b/attachment.htm>