diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-01-10 19:47:21 +0600 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-01-10 22:17:37 +0600 |
commit | b274d56dbb2e673cff0e87fe519cdeadb18971e4 (patch) | |
tree | 9260af9b141efc4be3825365a5949e450c9390f4 | |
parent | 6e19d1b2d56ba4e0b690157e228d6870c06fe5c6 (diff) |
src/libmsc/ussd.c: drop useless forward declaration
There is no any significant reason to define static function
'send_own_number' after the code that calls it.
Change-Id: I7f76f278c09489dccd96921610e8d06efa679ff2
-rw-r--r-- | src/libmsc/ussd.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/libmsc/ussd.c b/src/libmsc/ussd.c index 7b450a2df..eeab52a14 100644 --- a/src/libmsc/ussd.c +++ b/src/libmsc/ussd.c @@ -39,9 +39,19 @@ /* Declarations of USSD strings to be recognised */ const char USSD_TEXT_OWN_NUMBER[] = "*#100#"; -/* Forward declarations of network-specific handler functions */ -static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ss_request *req); +/* A network-specific handler function */ +static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ss_request *req) +{ + char *own_number = conn->vsub->msisdn; + char response_string[GSM_EXTENSION_LENGTH + 20]; + DEBUGP(DMM, "%s: MSISDN = %s\n", vlr_subscr_name(conn->vsub), + own_number); + + /* Need trailing CR as EOT character */ + snprintf(response_string, sizeof(response_string), "Your extension is %s\r", own_number); + return gsm0480_send_ussd_response(conn, msg, response_string, req); +} /* Entrypoint - handler function common to all mobile-originated USSDs */ int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg) @@ -88,17 +98,3 @@ int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg) return rc; } - -/* A network-specific handler function */ -static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ss_request *req) -{ - char *own_number = conn->vsub->msisdn; - char response_string[GSM_EXTENSION_LENGTH + 20]; - - DEBUGP(DMM, "%s: MSISDN = %s\n", vlr_subscr_name(conn->vsub), - own_number); - - /* Need trailing CR as EOT character */ - snprintf(response_string, sizeof(response_string), "Your extension is %s\r", own_number); - return gsm0480_send_ussd_response(conn, msg, response_string, req); -} |