diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-04-22 15:25:11 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-04-23 17:14:19 +0200 |
commit | e951abe6d009ccbb3836e857293514f204fe058a (patch) | |
tree | 87ee984329bd248fc4ea5a0dc9fcb8bbc2938c02 | |
parent | 91925416fbae6fe60996c1654f719f214b2fd7c0 (diff) | |
download | NetworkManager-e951abe6d009ccbb3836e857293514f204fe058a.tar.gz |
ifcfg-rh: don't try to read DEVTIMEOUT from file for in-memory connections
#0 0x00007ffff4a2c970 in g_logv (log_domain=0x7fffe9201115 "NetworkManager-ifcfg-rh", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffd710) at gmessages.c:1046
#1 0x00007ffff4a2cbaf in g_log (log_domain=log_domain@entry=0x7fffe9201115 "NetworkManager-ifcfg-rh", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff4a9bc1d "%s: assertion '%s' failed") at gmessages.c:1079
#2 0x00007ffff4a2cbe9 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7fffe9201115 "NetworkManager-ifcfg-rh", pretty_function=pretty_function@entry=0x7fffe9204b70 <__FUNCTION__.30626> "devtimeout_from_file", expression=expression@entry=0x7fffe9202d97 "filename != NULL") at gmessages.c:1088
#3 0x00007fffe91fbfa2 in devtimeout_from_file (filename=<optimized out>) at reader.c:4884
#4 0x00007fffe91ef845 in nm_ifcfg_connection_new (self=0x8d2200 [NMIfcfgConnection]) at nm-ifcfg-connection.c:159
#5 0x00007fffe91ef845 in nm_ifcfg_connection_new (source=source@entry=0x83ba40, full_path=full_path@entry=0x0, error=error@entry=0x7fffffffd980) at nm-ifcfg-connection.c:240
#6 0x00007fffe91ec7e6 in update_connection (self=self@entry=0x80c2a0 [SCPluginIfcfg], source=source@entry=0x83ba40, full_path=0x0, connection=connection@entry=0x0, protect_existing_connection=protect_existing_connection@entry=0, protected_connections=protected_connections@entry=0x0, error=0x7fffffffd980) at plugin.c:225
#7 0x00007fffe91eddf2 in add_connection (config=<optimized out>, connection=0x83ba40, save_to_disk=<optimized out>, error=0x7fffffffd980) at plugin.c:715
#8 0x000000000048fc1d in nm_settings_add_connection (self=<optimized out>, connection=0x83ba40, save_to_disk=0, error=<optimized out>) at settings/nm-settings.c:1045
#9 0x0000000000490858 in pk_add_cb (chain=0x8b1fc0, chain_error=<optimized out>, context=<optimized out>, user_data=<optimized out>) at settings/nm-settings.c:1151
#10 0x00000000004ca98c in auth_chain_finish (user_data=0x8b1fc0) at nm-auth-utils.c:82
#11 0x00007ffff4a257fb in g_main_context_dispatch (context=0x7cd3e0) at gmain.c:3111
#12 0x00007ffff4a257fb in g_main_context_dispatch (context=context@entry=0x7cd3e0) at gmain.c:3710
#13 0x00007ffff4a25b98 in g_main_context_iterate (context=0x7cd3e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#14 0x00007ffff4a25ec2 in g_main_loop_run (loop=0x7cd4a0) at gmain.c:3975
#15 0x0000000000444c81 in main (argc=<optimized out>, argv=<optimized out>) at main.c:486
(cherry picked from commit 72f264ad9bdebe8df89f84a178aefd9e4d8972ce)
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c index 9005a375f0..94d2225820 100644 --- a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c +++ b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c @@ -147,6 +147,7 @@ nm_ifcfg_connection_check_devtimeout (NMIfcfgConnection *self) NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE (self); NMSettingConnection *s_con; const char *ifname; + const char *filename; guint devtimeout; s_con = nm_connection_get_setting_connection (NM_CONNECTION (self)); @@ -156,7 +157,10 @@ nm_ifcfg_connection_check_devtimeout (NMIfcfgConnection *self) ifname = nm_setting_connection_get_interface_name (s_con); if (!ifname) return; - devtimeout = devtimeout_from_file (nm_settings_connection_get_filename (NM_SETTINGS_CONNECTION (self))); + filename = nm_settings_connection_get_filename (NM_SETTINGS_CONNECTION (self)); + if (!filename) + return; + devtimeout = devtimeout_from_file (filename); if (!devtimeout) return; |