From 919e305aa157f2f283f46ec83d47f11415a96fac Mon Sep 17 00:00:00 2001 From: Pekka Pessi Date: Wed, 6 Oct 2010 17:52:16 +0300 Subject: common: fixup logic of valid_ussd_string() The logic of valid_ussd_string was not quite correct as it didn't take care of size 1 USSD strings. In addition, call_in_progress parameter is passed in to take care of size 2 USSD strings which might start with a '1' according to the rules of 22.030. The comment about USSD routing is removed, it is out of scope of oFono. The cellular network routes the USSD requests based on the rules laid out in the 22.090, however, any string that can be encoded according to the rules of 23.030 is valid USSD. --- src/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index c43e46d7..8b5798a0 100644 --- a/src/common.h +++ b/src/common.h @@ -130,7 +130,7 @@ void string_to_phone_number(const char *str, struct ofono_phone_number *ph); int mmi_service_code_to_bearer_class(int code); -gboolean valid_ussd_string(const char *str); +gboolean valid_ussd_string(const char *str, gboolean call_in_progress); gboolean parse_ss_control_string(char *str, int *ss_type, char **sc, char **sia, -- cgit v1.2.3