#define SCAN_SLEEP_TIME 10000
-void msc_set_power_status(bool status);
+void _msc_set_power_status(bool status);
void msc_get_power_status(bool *status);
#endif /*_MEDIA_SCANNER_COMMON_V2_H_*/
*/
#include "media-scanner-common-v2.h"
+#include "media-common-dbg.h"
bool power_off2;
-void msc_set_power_status(bool status)
+void _msc_set_power_status(bool status)
{
power_off2 = status;
+
+ MS_DBG_WARN("media_scanner_v2 set power_off2 to %s", (status) ? "true" : "false");
}
void msc_get_power_status(bool *status)
extern GMutex scan_req_mutex2;
extern int g_directory_scan_processing2;
extern bool g_directory_extract_processing;
-bool power_off2; /*If this is true, poweroff notification received*/
static GMainLoop *scanner_mainloop2 = NULL;
static guint scanner_source_id2;
MS_DBG_ERR("POWER OFF CB Begin");
//display_lock_state(POWER_STATE_STANDBY, 0);
- power_off2 = true;
+ _msc_set_power_status(true);
__push_power_off(scan_queue2);
__push_power_off(reg_queue2);
scanner_source_id2 = g_io_add_watch(channel, G_IO_IN, msc_receive_request, NULL);
g_io_channel_unref(channel);
- MS_DBG_WARN("media_scanner_v2 set power_off2 to false...");
- power_off2 = false;
+ _msc_set_power_status(false);
/*create each threads*/
storage_scan_thread = g_thread_new("storage_scan_thread", msc_storage_scan_thread, NULL);