From: Daniel Wagner <[email protected]>

The current code expects that we have a valid policy config assign.
As long this holds true we should return an error in assign_policy_plugin.
---
We could obviously have a default empty configuration added to the core
if no plugin is available. That isn't a real problem. The current policy plugin
isn't really doing anything else. 

The IVI policy plugin does a bit more. So we could get rid of the default one
and only have the IVI one. 

What do you think?

 src/session.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/session.c b/src/session.c
index fe1f503..3d34c97 100644
--- a/src/session.c
+++ b/src/session.c
@@ -233,6 +233,9 @@ static int assign_policy_plugin(struct connman_session 
*session)
                break;
        }
 
+       if (session->policy == NULL)
+               return -ENODEV;
+
        return 0;
 }
 
-- 
1.8.0.rc0

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

Reply via email to