projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b9ed30
)
gresolv: Remove all pending lookups when resolver is removed
author
Jukka Rissanen
<jukka.rissanen@linux.intel.com>
Mon, 15 Oct 2012 10:36:04 +0000
(13:36 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Tue, 16 Oct 2012 09:19:18 +0000
(12:19 +0300)
Remove all lookups found in queue when GResolv object is removed.
gweb/gresolv.c
patch
|
blob
|
history
diff --git
a/gweb/gresolv.c
b/gweb/gresolv.c
index
440f43c
..
fd4cf10
100644
(file)
--- a/
gweb/gresolv.c
+++ b/
gweb/gresolv.c
@@
-866,6
+866,7
@@
GResolv *g_resolv_ref(GResolv *resolv)
void g_resolv_unref(GResolv *resolv)
{
struct resolv_query *query;
+ struct resolv_lookup *lookup;
if (resolv == NULL)
return;
@@
-873,6
+874,9
@@
void g_resolv_unref(GResolv *resolv)
if (__sync_fetch_and_sub(&resolv->ref_count, 1) != 1)
return;
+ while ((lookup = g_queue_pop_head(resolv->lookup_queue)))
+ g_resolv_cancel_lookup(resolv, lookup->id);
+
while ((query = g_queue_pop_head(resolv->query_queue)))
destroy_query(query);