aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-09-26 23:30:44 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-09-27 14:44:30 +0200
commit8a9f92bbea44e20baa0004b9b27314a87bbd3f98 (patch)
tree683483dd9b27839740106e2db5864247ba583a46
parent4a3e8f5b19c2b9fae62ae7f567657c7e3091fdbb (diff)
sccp_vty: define SCCP_STR once
Define SCCP_STR in sccp_internal.h, because I know that I want to also use it in osmo_ss7_vty.c. Fix "Signaling" to "Signalling" upon copying the old string. Change-Id: Ic93e4771147070a9222c73f80b5f7c29ae7eec35
-rw-r--r--src/sccp_internal.h2
-rw-r--r--src/sccp_vty.c9
-rw-r--r--tests/vty/ss7_asp_test.vty2
3 files changed, 6 insertions, 7 deletions
diff --git a/src/sccp_internal.h b/src/sccp_internal.h
index 66d768d..651862f 100644
--- a/src/sccp_internal.h
+++ b/src/sccp_internal.h
@@ -5,6 +5,8 @@
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/osmo_ss7.h>
+#define SCCP_STR "Signalling Connection Control Part\n"
+
/* an instance of the SCCP stack */
struct osmo_sccp_instance {
/* entry in global list of ss7 instances */
diff --git a/src/sccp_vty.c b/src/sccp_vty.c
index bcedbb6..2727ccc 100644
--- a/src/sccp_vty.c
+++ b/src/sccp_vty.c
@@ -54,8 +54,7 @@ static void show_user(struct vty *vty, struct osmo_sccp_user *user)
DEFUN(show_sccp_users, show_sccp_users_cmd,
"show cs7 instance <0-15> sccp users",
- SHOW_STR CS7_STR INST_STR INST_STR
- "Signaling Connection Control Part\n"
+ SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR
"Show List of SCCP Users registered\n")
{
int id = atoi(argv[0]);
@@ -83,8 +82,7 @@ DEFUN(show_sccp_users, show_sccp_users_cmd,
DEFUN(show_sccp_user_ssn, show_sccp_user_ssn_cmd,
"show cs7 instance <0-15> sccp ssn <0-65535>",
- SHOW_STR CS7_STR INST_STR INST_STR
- "Signaling Connection Control Part\n"
+ SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR
"Show List of SCCP Users registered\n")
{
int id = atoi(argv[0]);
@@ -118,8 +116,7 @@ DEFUN(show_sccp_user_ssn, show_sccp_user_ssn_cmd,
DEFUN(show_sccp_connections, show_sccp_connections_cmd,
"show cs7 instance <0-15> sccp connections",
- SHOW_STR CS7_STR INST_STR INST_STR
- "Signaling Connection Control Part\n"
+ SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR
"Show List of SCCP Users registered\n")
{
int id = atoi(argv[0]);
diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty
index fc46cff..9a86b23 100644
--- a/tests/vty/ss7_asp_test.vty
+++ b/tests/vty/ss7_asp_test.vty
@@ -42,7 +42,7 @@ ss7_asp_vty_test# show cs7 instance 0 ?
users User Table
asp Application Server Process (ASP)
as Application Server (AS)
- sccp Signaling Connection Control Part
+ sccp Signalling Connection Control Part
ss7_asp_vty_test# show cs7 instance 0 as ?
active Display all active ASs