2005-01-14 Colin Walters <walters@redhat.com>
Patch from ed@catmur.co.uk (Ed Catmur) * named/nm-named-manager.c: Add "context" property. Use it to add child watch source in specific GMainContext. * src/NetworkManager.c (nm_data_new): Initialize named with correct main context. Start named only after forking. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@377 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:

committed by
Colin Walters

parent
0229295c83
commit
f9d46351f6
@@ -553,12 +553,7 @@ static NMData *nm_data_new (gboolean enable_test_devices)
|
||||
sigaction (SIGINT, &action, NULL);
|
||||
sigaction (SIGTERM, &action, NULL);
|
||||
|
||||
data->named = nm_named_manager_new ();
|
||||
if (!nm_named_manager_start (data->named, &error))
|
||||
{
|
||||
syslog (LOG_CRIT, "Couldn't initialize nameserver: %s", error->message);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
data->named = nm_named_manager_new (data->main_context);
|
||||
|
||||
/* Initialize the device list mutex to protect additions/deletions to it. */
|
||||
data->dev_list_mutex = g_mutex_new ();
|
||||
@@ -818,6 +813,12 @@ int main( int argc, char *argv[] )
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (!nm_named_manager_start (nm_data->named, &error))
|
||||
{
|
||||
syslog (LOG_CRIT, "Couldn't initialize nameserver: %s", error->message);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Start the wireless scanning thread and timeout */
|
||||
if (!g_thread_create (nm_wireless_scan_worker, nm_data, FALSE, &error))
|
||||
{
|
||||
|
Reference in New Issue
Block a user