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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: ctrl: remove boilerplate code ...................................................................... ctrl: remove boilerplate code Define subscriber-list-active-v1 ctrl command as RO and remove unnecessary functions. Change-Id: I88fe905c22cf7563415d470b88cb43fca0d52a7f --- M openbsc/src/gprs/sgsn_ctrl.c M openbsc/src/libmsc/ctrl_commands.c 2 files changed, 2 insertions(+), 24 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/sgsn_ctrl.c b/openbsc/src/gprs/sgsn_ctrl.c index ccf5076..31ac74f 100644 --- a/openbsc/src/gprs/sgsn_ctrl.c +++ b/openbsc/src/gprs/sgsn_ctrl.c @@ -30,17 +30,6 @@ extern vector ctrl_node_vec; -static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *v, void *d) -{ - return 1; -} - -static int set_subscriber_list(struct ctrl_cmd *cmd, void *d) -{ - cmd->reply = "Get only attribute"; - return CTRL_CMD_ERROR; -} - static int get_subscriber_list(struct ctrl_cmd *cmd, void *d) { struct sgsn_mm_ctx *mm; @@ -64,7 +53,7 @@ return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(subscriber_list, "subscriber-list-active-v1"); +CTRL_CMD_DEFINE_RO(subscriber_list, "subscriber-list-active-v1"); int sgsn_ctrl_cmds_install(void) { diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index a56d122..c99dde4 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -184,17 +184,6 @@ } CTRL_CMD_DEFINE_WO_NOVRF(subscriber_delete, "subscriber-delete-v1"); -static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *value, void *d) -{ - return 1; -} - -static int set_subscriber_list(struct ctrl_cmd *cmd, void *d) -{ - cmd->reply = "Get only attribute"; - return CTRL_CMD_ERROR; -} - static void list_cb(struct gsm_subscriber *subscr, void *d) { char **data = (char **) d; @@ -210,7 +199,7 @@ printf("%s\n", cmd->reply); return CTRL_CMD_REPLY; } -CTRL_CMD_DEFINE(subscriber_list, "subscriber-list-active-v1"); +CTRL_CMD_DEFINE_RO(subscriber_list, "subscriber-list-active-v1"); int msc_ctrl_cmds_install(void) { -- To view, visit https://gerrit.osmocom.org/2463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88fe905c22cf7563415d470b88cb43fca0d52a7f Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder