Re: [PATCH] proxy: remove timeout on proxy cleanup

2014-10-23 Thread Patrik Flykt
On Wed, 2014-10-22 at 12:33 +0300, Hannu Mallat wrote:
 Make sure the timeout source is cleaned when proxy_lookup struct is
 deallocated.

Applied, thanks!

Patrik

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH] proxy: remove timeout on proxy cleanup

2014-10-22 Thread Hannu Mallat
Make sure the timeout source is cleaned when proxy_lookup struct is
deallocated.
---
 src/proxy.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/proxy.c b/src/proxy.c
index 0d1a25a..f331de9 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -44,6 +44,9 @@ struct proxy_lookup {
 
 static void remove_lookup(struct proxy_lookup *lookup)
 {
+   if (lookup-watch  0)
+   g_source_remove(lookup-watch);
+
lookup_list = g_slist_remove(lookup_list, lookup);
 
connman_service_unref(lookup-service);
@@ -150,11 +153,6 @@ void connman_proxy_lookup_cancel(unsigned int token)
}
 
if (lookup) {
-   if (lookup-watch  0) {
-   g_source_remove(lookup-watch);
-   lookup-watch = 0;
-   }
-
if (lookup-proxy 
lookup-proxy-cancel_lookup)
lookup-proxy-cancel_lookup(lookup-service,
-- 
1.9.1

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman