aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gsm_04_80.h
diff options
context:
space:
mode:
authorMike Haben <michael.haben@btinternet.com>2009-10-26 20:36:34 +0100
committerHarald Welte <laforge@gnumonks.org>2009-10-26 20:39:26 +0100
commit2449b37dfe424248ea9fe2143efb78a3cd385d64 (patch)
treee9b939fed62cc7b978fbb5477aea2169001587e8 /openbsc/include/openbsc/gsm_04_80.h
parentdc329a6cdb204d89c15599ca606e239dde368e7f (diff)
[USSD] various USSD improvements
- Improved handling of extension-number string (as per review) - Guard against a buffer-overflow if mobile sends a too-long USSD - declare some function-parameters const - fix gsm_ts_name function to display the right BTS number (bts->nr rather than bts->bts_nr)
Diffstat (limited to 'openbsc/include/openbsc/gsm_04_80.h')
-rw-r--r--openbsc/include/openbsc/gsm_04_80.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h
index 9bdf2c200..c240bbe94 100644
--- a/openbsc/include/openbsc/gsm_04_80.h
+++ b/openbsc/include/openbsc/gsm_04_80.h
@@ -125,17 +125,19 @@
#include <openbsc/msgb.h>
+#define MAX_LEN_USSD_STRING 31
+
struct ussd_request {
- char text[32];
+ char text[MAX_LEN_USSD_STRING + 1];
u_int8_t transaction_id;
u_int8_t invoke_id;
};
-int gsm0480_decode_ussd_request(struct msgb *msg,
+int gsm0480_decode_ussd_request(const struct msgb *msg,
struct ussd_request *request);
-int gsm0480_send_ussd_response(struct msgb *in_msg, const char* response_text,
+int gsm0480_send_ussd_response(const struct msgb *in_msg, const char* response_text,
const struct ussd_request *req);
-int gsm0480_send_ussd_reject(struct msgb *msg,
+int gsm0480_send_ussd_reject(const struct msgb *msg,
const struct ussd_request *request);
#endif