Hi Wagi,

On ma, 2015-07-27 at 14:47 +0200, Daniel Wagner wrote:
> When the policy file doesn't define all values of the polcies

polcies -> policy

> some of the values are not properly initialized or set
> to sane defaults. Setting all values to defaults and then
> overwrite all or partially is what most people would expect.
> Let's do it this way.
> ---
>  plugins/session_policy_local.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/plugins/session_policy_local.c b/plugins/session_policy_local.c
> index b2369bd..5b108d8 100644
> --- a/plugins/session_policy_local.c
> +++ b/plugins/session_policy_local.c
> @@ -623,7 +623,7 @@ static int load_file(const char *filename, struct 
> policy_file *file)
>  
>       for (i = 0; groupnames[i]; i++) {
>               group = g_new0(struct policy_group, 1);
> -             group->config = g_new0(struct connman_session_config, 1);
> +             group->config = connman_session_create_default_config();
>  
>               err = load_policy(keyfile, groupnames[i], group);
>               if (err < 0) {



Cheers,
Jukka


_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to