[PATCH] openbsc[master]: CTRL: cleanup write-only command functions

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/.

Max gerrit-no-reply at lists.osmocom.org
Sat Sep 23 12:53:48 UTC 2017


Review at  https://gerrit.osmocom.org/4016

CTRL: cleanup write-only command functions

Remove trivial functions by using more specific defines for CTRL
commands.

Change-Id: I719b75b6ca1e9372ea11e7e9ff7896021f357035
---
M openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
1 file changed, 3 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/16/4016/1

diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
index c23ed21..423ed34 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -466,13 +466,7 @@
 	return 1;
 }
 
-CTRL_CMD_DEFINE(net_notification, "notification");
-static int get_net_notification(struct ctrl_cmd *cmd, void *data)
-{
-	cmd->reply = "There is nothing to read";
-	return CTRL_CMD_ERROR;
-}
-
+CTRL_CMD_DEFINE_WO_NOVRF(net_notification, "notification");
 static int set_net_notification(struct ctrl_cmd *cmd, void *data)
 {
 	struct ctrl_cmd *trap;
@@ -502,18 +496,7 @@
 	return CTRL_CMD_HANDLED;
 }
 
-static int verify_net_notification(struct ctrl_cmd *cmd, const char *value, void *data)
-{
-	return 0;
-}
-
-CTRL_CMD_DEFINE(net_inform_msc, "inform-msc-v1");
-static int get_net_inform_msc(struct ctrl_cmd *cmd, void *data)
-{
-	cmd->reply = "There is nothing to read";
-	return CTRL_CMD_ERROR;
-}
-
+CTRL_CMD_DEFINE_WO_NOVRF(net_inform_msc, "inform-msc-v1");
 static int set_net_inform_msc(struct ctrl_cmd *cmd, void *data)
 {
 	struct gsm_network *net;
@@ -540,18 +523,7 @@
 	return CTRL_CMD_HANDLED;
 }
 
-static int verify_net_inform_msc(struct ctrl_cmd *cmd, const char *value, void *data)
-{
-	return 0;
-}
-
-CTRL_CMD_DEFINE(net_ussd_notify, "ussd-notify-v1");
-static int get_net_ussd_notify(struct ctrl_cmd *cmd, void *data)
-{
-	cmd->reply = "There is nothing to read";
-	return CTRL_CMD_ERROR;
-}
-
+CTRL_CMD_DEFINE_WO(net_ussd_notify, "ussd-notify-v1");
 static int set_net_ussd_notify(struct ctrl_cmd *cmd, void *data)
 {
 	struct gsm_subscriber_connection *conn;

-- 
To view, visit https://gerrit.osmocom.org/4016
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I719b75b6ca1e9372ea11e7e9ff7896021f357035
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list