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
This commit is contained in:
Neels Hofmeyr 2018-09-26 23:30:44 +02:00
parent 4a3e8f5b19
commit 8a9f92bbea
3 changed files with 6 additions and 7 deletions

View File

@ -5,6 +5,8 @@
#include <osmocom/sigtran/sccp_sap.h> #include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/osmo_ss7.h> #include <osmocom/sigtran/osmo_ss7.h>
#define SCCP_STR "Signalling Connection Control Part\n"
/* an instance of the SCCP stack */ /* an instance of the SCCP stack */
struct osmo_sccp_instance { struct osmo_sccp_instance {
/* entry in global list of ss7 instances */ /* entry in global list of ss7 instances */

View File

@ -54,8 +54,7 @@ static void show_user(struct vty *vty, struct osmo_sccp_user *user)
DEFUN(show_sccp_users, show_sccp_users_cmd, DEFUN(show_sccp_users, show_sccp_users_cmd,
"show cs7 instance <0-15> sccp users", "show cs7 instance <0-15> sccp users",
SHOW_STR CS7_STR INST_STR INST_STR SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR
"Signaling Connection Control Part\n"
"Show List of SCCP Users registered\n") "Show List of SCCP Users registered\n")
{ {
int id = atoi(argv[0]); 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, DEFUN(show_sccp_user_ssn, show_sccp_user_ssn_cmd,
"show cs7 instance <0-15> sccp ssn <0-65535>", "show cs7 instance <0-15> sccp ssn <0-65535>",
SHOW_STR CS7_STR INST_STR INST_STR SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR
"Signaling Connection Control Part\n"
"Show List of SCCP Users registered\n") "Show List of SCCP Users registered\n")
{ {
int id = atoi(argv[0]); 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, DEFUN(show_sccp_connections, show_sccp_connections_cmd,
"show cs7 instance <0-15> sccp connections", "show cs7 instance <0-15> sccp connections",
SHOW_STR CS7_STR INST_STR INST_STR SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR
"Signaling Connection Control Part\n"
"Show List of SCCP Users registered\n") "Show List of SCCP Users registered\n")
{ {
int id = atoi(argv[0]); int id = atoi(argv[0]);

View File

@ -42,7 +42,7 @@ ss7_asp_vty_test# show cs7 instance 0 ?
users User Table users User Table
asp Application Server Process (ASP) asp Application Server Process (ASP)
as Application Server (AS) as Application Server (AS)
sccp Signaling Connection Control Part sccp Signalling Connection Control Part
ss7_asp_vty_test# show cs7 instance 0 as ? ss7_asp_vty_test# show cs7 instance 0 as ?
active Display all active ASs active Display all active ASs