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/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21058 ) Change subject: osmo-gbproxy: Implement nsvc-state ctrl command ...................................................................... osmo-gbproxy: Implement nsvc-state ctrl command Change-Id: I0beb572103803f3ee4ecb28d9bf2e3139e0f8aa4 --- M src/gbproxy/gb_proxy_ctrl.c 1 file changed, 15 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/58/21058/1 diff --git a/src/gbproxy/gb_proxy_ctrl.c b/src/gbproxy/gb_proxy_ctrl.c index 3ebc7d1..9577383 100644 --- a/src/gbproxy/gb_proxy_ctrl.c +++ b/src/gbproxy/gb_proxy_ctrl.c @@ -33,12 +33,20 @@ extern vector ctrl_node_vec; -static int ctrl_nsvc_state_cb(struct gprs_ns2_vc *nsvc, void *ctx) { -/* FIXME: Can't get NSVC state in ns2 - struct ctrl_cmd *cmd = (struct ctrl_cmd *)ctx; +struct nsvc_cb_data { + struct ctrl_cmd *cmd; + uint16_t nsei; + bool is_sgsn; +}; - cmd->reply = gprs_ns2_vc_state_append(cmd->reply, nsvc); -*/ +static int ctrl_nsvc_state_cb(struct gprs_ns2_vc *nsvc, void *ctx) { + struct nsvc_cb_data *data = (struct nsvc_cb_data *)ctx; + struct ctrl_cmd *cmd = (struct ctrl_cmd *)data->cmd; + + cmd->reply = talloc_asprintf_append(cmd->reply, "%u,%s,%s,%s\n", + data->nsei, gprs_ns2_ll_str(nsvc), gprs_ns2_nsvc_state_name(nsvc), + data->is_sgsn ? "SGSN" : "BSS" ); + return 0; } @@ -66,8 +74,8 @@ if (nse) gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, cmd); } - cmd->reply = "Getting NSVC state not yet implemented for NS2"; - return CTRL_CMD_ERROR; + + return CTRL_CMD_REPLY; } CTRL_CMD_DEFINE_RO(nsvc_state, "nsvc-state"); -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/21058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I0beb572103803f3ee4ecb28d9bf2e3139e0f8aa4 Gerrit-Change-Number: 21058 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201106/35dde039/attachment.htm>