On 19.10.2012 20:59, Patrik Flykt wrote:
On fre, 2012-10-19 at 13:47 +0200, Daniel Wagner wrote:
On Fri, Oct 19, 2012 at 01:11:36PM +0300, Patrik Flykt wrote:
-       return 0;
+       return (*session->policy->create)(session, callback, user_data);

Here also a check for the create function is needed before calling it.

I think I am going to add this test to the registration function. What do you
think on this?

Yep, always check that pointers are set before calling them.

So you prefer the check near the call. My question was if it would be okay to have the check when the plugin is registered to test if all needed callbacks are not NULL.

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to