Hi Aki,
> src/network.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> 1 files changed, 72 insertions(+), 3 deletions(-)
>
> diff --git a/src/network.c b/src/network.c
> index b5450ee..64734d0 100644
> --- a/src/network.c
> +++ b/src/network.c
> @@ -64,6 +64,7 @@ struct ofono_netreg {
> int cellid;
> int technology;
> int mode;
> + gboolean forced_auto;
do we wanna keep it named forced_auto and not better keep this in sync
with auto_only as we use in the D-Bus API. Or if manual_disabled.
> char *base_station;
> struct network_operator_data *current_operator;
> GSList *operator_list;
> @@ -93,8 +94,11 @@ struct network_operator_data {
> struct ofono_netreg *netreg;
> };
>
> -static const char *registration_mode_to_string(int mode)
> +static const char *registration_mode_to_string(int mode, gboolean
> forced_auto)
> {
> + if (forced_auto)
> + return "auto-only";
> +
I see the benefit of keeping this in this function, but I would not have
done it like this actually. I would have kept it next to the function
needing that string and let it do the auto-only check by itself.
Another possibility might be to convert this into
get_registration_mode_string(struct ofono_netreg *netreg)
Since I am not mistaken, then the netreg->mode is always set before you
are calling this, right?
Regards
Marcel
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono