diff options
author | Mike Haben <michael.haben@btinternet.com> | 2009-10-22 09:56:44 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-10-26 20:39:26 +0100 |
commit | dc329a6cdb204d89c15599ca606e239dde368e7f (patch) | |
tree | 39ea0ad4d2749011f87ca2a06b2c4afe8b052c94 /openbsc/include/openbsc/gsm_04_80.h | |
parent | 6307b8570061597d165d1e2cfdfbf77ca6f90073 (diff) |
[USSD] eliminate static global variables
This patch removes the need of static global variables and introduces a new,
caller-allocated 'struct ussd_request' that needs to be passed to the various
functions.
Diffstat (limited to 'openbsc/include/openbsc/gsm_04_80.h')
-rw-r--r-- | openbsc/include/openbsc/gsm_04_80.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h index 11962d81d..9bdf2c200 100644 --- a/openbsc/include/openbsc/gsm_04_80.h +++ b/openbsc/include/openbsc/gsm_04_80.h @@ -125,8 +125,17 @@ #include <openbsc/msgb.h> -char* gsm0480_rcv_ussd(struct msgb *msg); -int gsm0480_send_ussd_response(struct msgb *msg, const char* response_text); -int gsm0480_send_ussd_reject(struct msgb *msg); +struct ussd_request { + char text[32]; + u_int8_t transaction_id; + u_int8_t invoke_id; +}; + +int gsm0480_decode_ussd_request(struct msgb *msg, + struct ussd_request *request); +int gsm0480_send_ussd_response(struct msgb *in_msg, const char* response_text, + const struct ussd_request *req); +int gsm0480_send_ussd_reject(struct msgb *msg, + const struct ussd_request *request); #endif |