Commit 74ed416d authored by Lubomir Rintel's avatar Lubomir Rintel

manager: don't try to delete generated connection if it's already gone

Move the cleanup of the generated assumed connection to active connection
dispose. If the connection vanishes earlier (explicit deletion from client),
tear down the reference so that we don't try to remove it redundantly.

  NetworkManager[9221]: <info>  (eth2): device state change: deactivating -> disconnected (reason 'connection-removed') [110 30 38]
  NetworkManager[9221]: <info>  (eth2): deactivating device (reason 'connection-removed') [38]

  (NetworkManager:9221): GLib-GObject-WARNING **: g_object_weak_unref: couldn't find weak ref 0x496610(0x7c2ba0)

  Program received signal SIGTRAP, Trace/breakpoint trap.
  g_logv (log_domain=0x7ffff4d4f1a4 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffd860) at gmessages.c:1046
  1046              g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
  (gdb) bt
  #0  0x00007ffff4a2cc60 in g_logv (log_domain=0x7ffff4d4f1a4 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffd860) at gmessages.c:1046
  #1  0x00007ffff4a2ce9f in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1079
  #2  0x000000000049780b in nm_dbus_manager_unregister_object (self=0x7c2ba0 [NMDBusManager], object=0x80f3e0) at nm-dbus-manager.c:921
  #3  0x000000000047cc83 in nm_settings_connection_signal_remove (self=self@entry=0x80f3e0 [NMIfcfgConnection]) at settings/nm-settings-connection.c:1752
  #4  0x000000000047cd22 in do_delete (connection=0x80f3e0 [NMIfcfgConnection], callback=0x479d60 <ignore_cb>, user_data=0x0) at settings/nm-settings-connection.c:687
  #5  0x00000000004b1eb6 in active_connection_remove (self=self@entry=0x8701c0 [NMManager], active=active@entry=0x8b02f0) at nm-manager.c:292
  #6  0x00000000004b2174 in _active_connection_cleanup (user_data=<optimized out>) at nm-manager.c:316
  #7  0x00007ffff4a25aeb in g_main_context_dispatch (context=0x7be3a0) at gmain.c:3111
  #8  0x00007ffff4a25aeb in g_main_context_dispatch (context=context@entry=0x7be3a0) at gmain.c:3710
  #9  0x00007ffff4a25e88 in g_main_context_iterate (context=0x7be3a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
  #10 0x00007ffff4a261b2 in g_main_loop_run (loop=0x7be460) at gmain.c:3975
  #11 0x0000000000432f55 in main (argc=1, argv=0x7fffffffded8) at main.c:460
parent 8a00bb36
......@@ -286,7 +286,8 @@ active_connection_remove (NMManager *self, NMActiveConnection *active)
g_object_unref (active);
if (connection) {
if ( connection
&& nm_settings_has_connection (priv->settings, connection)) {
nm_log_dbg (LOGD_DEVICE, "Assumed connection disconnected. Deleting generated connection '%s' (%s)",
nm_connection_get_id (connection), nm_connection_get_uuid (connection));
nm_settings_connection_delete (NM_SETTINGS_CONNECTION (connection), NULL, NULL);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment