aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/ussd.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-10-16 08:41:51 +0200
committerHarald Welte <laforge@gnumonks.org>2009-10-26 20:39:26 +0100
commit6307b8570061597d165d1e2cfdfbf77ca6f90073 (patch)
treea3b1a627424748e499cb3b4c714f4cd62ca29bba /openbsc/src/ussd.c
parent6eafe9137ca345078531fc607a461f397faa505b (diff)
whitespace fixes for the USSD code
This patch is not changing any actual code, just coding style fixes.
Diffstat (limited to 'openbsc/src/ussd.c')
-rw-r--r--openbsc/src/ussd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/openbsc/src/ussd.c b/openbsc/src/ussd.c
index 5f9a45725..9dc2205f1 100644
--- a/openbsc/src/ussd.c
+++ b/openbsc/src/ussd.c
@@ -22,7 +22,8 @@
*
*/
-/* This module defines the network-specific handling of mobile-originated USSD messages. */
+/* This module defines the network-specific handling of mobile-originated
+ USSD messages. */
#include <stdio.h>
#include <stdlib.h>
@@ -43,12 +44,12 @@ static int send_own_number(struct msgb *msg);
/* Entrypoint - handler function common to all mobile-originated USSDs */
int handle_rcv_ussd(struct msgb *msg)
{
- char* ussd_text_rcvd = gsm0480_rcv_ussd(msg);
+ char *ussd_text_rcvd = gsm0480_rcv_ussd(msg);
- if(ussd_text_rcvd[0] == 0xFF) /* Release-Complete */
- return 0;
+ if (ussd_text_rcvd[0] == 0xFF) /* Release-Complete */
+ return 0;
- if(strstr(USSD_TEXT_OWN_NUMBER, ussd_text_rcvd) != NULL) {
+ if (strstr(USSD_TEXT_OWN_NUMBER, ussd_text_rcvd) != NULL) {
DEBUGP(DMM, "USSD: Own number requested\n");
return send_own_number(msg);
} else {
@@ -60,9 +61,10 @@ int handle_rcv_ussd(struct msgb *msg)
/* A network-specific handler function */
static int send_own_number(struct msgb *msg)
{
- char response_string[] = "Your extension is xxxxx\r"; /* Need trailing CR as EOT character */
+ char *own_number = msg->lchan->subscr->extension;
+ /* Need trailing CR as EOT character */
+ char response_string[] = "Your extension is xxxxx\r";
- char* own_number = msg->lchan->subscr->extension;
memcpy(response_string + 18, own_number, 5);
return gsm0480_send_ussd_response(msg, response_string);
}