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/ussd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ussd.c') diff --git a/src/ussd.c b/src/ussd.c index c80d2473..42e547a0 100644 --- a/src/ussd.c +++ b/src/ussd.c @@ -565,7 +565,7 @@ static DBusMessage *ussd_initiate(DBusConnection *conn, DBusMessage *msg, return NULL; DBG("No.., checking if this is a USSD string"); - if (!valid_ussd_string(str)) + if (!valid_ussd_string(str, FALSE)) return __ofono_error_invalid_format(msg); if (!ussd_encode(str, &num_packed, buf)) -- cgit v1.2.3