[Filesystem] Fixed invalid unregistration of StateListener 31/280331/1
authorPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Fri, 26 Aug 2022 13:24:50 +0000 (15:24 +0200)
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Fri, 26 Aug 2022 14:17:19 +0000 (16:17 +0200)
Issue occurred when running filesystem manual TCTs, first test passed,
the second test didn't pass because static FilesystemManager didn't
unregister the listener properly.

[Verification]
Filesystem manual TCT passed.
Filesystem auto 100% pass.

Change-Id: I185f541b15c146c3b62fb1dbfd5df48c0a9dd5e4

src/common/filesystem/filesystem_provider_deviced.cc

index 9bfb5ea..f179be0 100644 (file)
@@ -211,6 +211,7 @@ void FilesystemProviderDeviced::UnregisterDeviceChangeState() {
     LoggerD("Dbus signal handling unsubscription");
     g_dbus_connection_signal_unsubscribe(dbus_, block_signal_subscribe_id_);
   }
+  block_signal_subscribe_id_ = 0;
   device_changed_callback_ = nullptr;
 }