this.set_bool ("general", UPNP_ENABLED_KEY, true);
} else {
// Stop service only if already running
+ // Then delete the symlink from user's autostart dir
+ try {
+ dest.delete (null);
+ } catch (IOError.NOT_FOUND err) {}
+
+ this.set_bool ("general", UPNP_ENABLED_KEY, false);
+
if (this.is_upnp_enabled ()) {
// Create proxy to Rygel
DBusInterface rygel_proxy = Bus.get_proxy_sync
rygel_proxy.shutdown ();
}
-
- // Then delete the symlink from user's autostart dir
- try {
- dest.delete (null);
- } catch (IOError.NOT_FOUND err) {}
-
- this.set_bool ("general", UPNP_ENABLED_KEY, false);
}
} catch (GLib.Error err) {
string message;