2008-09-30 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c - (lookup_thread_worker): don't store the idle handler ID becuase the idle handler could have already run and freed the LookupThread structure git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4126 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2008-09-30 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/NetworkManagerPolicy.c
|
||||
- (lookup_thread_worker): don't store the idle handler ID becuase the
|
||||
idle handler could have already run and freed the LookupThread
|
||||
structure
|
||||
|
||||
2008-09-30 Tambet Ingo <tambet@gmail.com>
|
||||
|
||||
* src/nm-device.c (nm_device_get_priority): Implement.
|
||||
|
@@ -58,7 +58,6 @@ struct LookupThread {
|
||||
guint32 ip4_addr;
|
||||
char hostname[NI_MAXHOST + 1];
|
||||
|
||||
guint done_id;
|
||||
LookupCallback callback;
|
||||
gpointer user_data;
|
||||
};
|
||||
@@ -110,7 +109,11 @@ lookup_thread_worker (gpointer data)
|
||||
thread->hostname[i] = tolower (thread->hostname[i]);
|
||||
}
|
||||
|
||||
thread->done_id = g_idle_add (lookup_thread_run_cb, thread);
|
||||
/* Don't track the idle handler ID because by the time the g_idle_add()
|
||||
* returns the ID, the handler may already have run and freed the
|
||||
* LookupThread.
|
||||
*/
|
||||
g_idle_add (lookup_thread_run_cb, thread);
|
||||
return (gpointer) TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user