Hi Pekka,

> The valid_ussd_string() returns true if MMI input is to be sent as USSD.
> ---
>  src/common.c |   39 ++++++++++++++-------------------------
>  src/common.h |    2 +-
>  src/ussd.c   |    2 +-
>  3 files changed, 16 insertions(+), 27 deletions(-)
> 
> diff --git a/src/common.c b/src/common.c
> index 55c4b40..e0a8387 100644
> --- a/src/common.c
> +++ b/src/common.c
> @@ -393,7 +393,7 @@ void string_to_phone_number(const char *str, struct 
> ofono_phone_number *ph)
>       }
>  }
>  
> -int valid_ussd_string(const char *str)
> +gboolean valid_ussd_string(const char *str, gboolean call_in_progress)
>  {
>       int len = strlen(str);
>  
> @@ -401,37 +401,26 @@ int valid_ussd_string(const char *str)
>               return FALSE;
>  
>       /*
> -      * It is hard to understand exactly what constitutes a valid USSD string
> -      * According to 22.090:
> -      * Case a - 1, 2 or 3 digits from the set (*, #) followed by 1X(Y),
> -      * where X=any number 0‑4, Y=any number 0‑9, then, optionally "*
> -      * followed by any number of any characters", and concluding with #SEND
> -      *
> -      * Case b - 1, 2 or 3 digits from the set (*, #) followed by 1X(Y),
> -      * where X=any number 5‑9, Y=any number 0‑9, then, optionally "*
> -      * followed by any number of any characters", and concluding with #SEND
> -      *
> -      * Case c - 7(Y) SEND, where Y=any number 0‑9
> -      *
> -      * Case d - All other formats
> -      *
>        * According to 22.030 Figure 3.5.3.2 USSD strings can be:
>        *
> -      * Supplementary service control
> -      * SIM control
> -      * Manufacturer defined
> -      * Terminated by '#'
> -      * Short String - This can be any 2 digit short string.  If the string
> -      *                starts with a '1' and no calls are in progress then
> -      *                this string is treated as a call setup request
> +      * 1) Terminated by '#'
> +      * 2) A short string of 1 or 2 digits.
>        *
> -      * Everything else is not a valid USSD string
> +      * If a 2 digit string starts with a '1' and no calls are in
> +      * progress then this string is treated as a call setup request
> +      * instead.
>        */

this is not an acceptable patch. You are removing functionality and
lengthy comment without providing a comment in the commit message from
equal length and detail.

We can not do it like this since 1 month later nobody remembers what has
been done here and why. This needs proper documentation.

Regards

Marcel


_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to