Skip to content

LocationSource::start/stop should return TRUE if already in target state

Zeeshan Ali Khan requested to merge zeenix/geoclue:fix-crashes into master

If a source is already started/active and start() is called on it, it shouuldn't return FALSE as that indicates a failure to start. The same goes for stop() and inactive state.

In case of stop() being called on an already inactive source, the actual source implementation will not do rest of the teardown and could end up in a state where the object has been finalized while its resources are still not freed. Not only does that constitute leaks but these resources include timeouts that access the object that has already been freed.

It is my hope that this solves some of the crashes and leaks we still are getting reports of.

Fixes #117 (closed) (hopefully!).

Merge request reports