extract_data = g_async_queue_pop(folder_extract_queue);
if (extract_data->pid == POWEROFF) {
MS_DBG_ERR("power off");
- goto _POWEROFF;
+ __msc_resume_extract();
+ g_free(extract_data);
+ return NULL;
}
MS_DBG_WARN("DIRECTORY EXTRACT START [%.*s %d]", MAX_MSG_SIZE, extract_data->msg, extract_data->msg_type);
extract_data = g_async_queue_pop(storage_extract_queue);
if (extract_data->pid == POWEROFF) {
MS_DBG_ERR("power off");
- goto _POWEROFF;
+ MS_SAFE_FREE(extract_data);
+ return NULL;
}
__msc_set_storage_extract_status(MS_STORAGE_SCAN_META_PROCESSING);
if (scan_data->pid == POWEROFF) {
MS_DBG_ERR("power off");
- goto _POWEROFF;
+ g_free(scan_data);
+ return NULL;
}
MS_DBG_WARN("DIRECTORY SCAN START [%.*s][%s][%d]", MAX_MSG_SIZE, scan_data->msg, scan_data->storage_id, scan_data->msg_type);
scan_data = g_async_queue_pop(storage_queue2);
if (scan_data->pid == POWEROFF) {
MS_DBG_ERR("power off");
- goto _POWEROFF;
+ g_free(scan_data);
+ return NULL;
}
MS_DBG_WARN("STORAGE SCAN START [%.*s][%s]", MAX_MSG_SIZE, scan_data->msg, scan_data->storage_id);
{
int fd = -1;
int err = -1;
+ int err_no = 0;
fd = open(MS_SCANNER_FIFO_PATH_REQ, O_WRONLY|O_NONBLOCK);
- MS_DBG_RETVM_IF(fd < 0, MS_MEDIA_ERR_INTERNAL, "fifo open failed");
+ MS_DBG_RETVM_IF(fd < 0, MS_MEDIA_ERR_INTERNAL, "fifo open failed[%d]", errno);
/* send message */
err = write(fd, send_msg, sizeof(ms_comm_msg_s));
+ err_no = errno;
close(fd);
- MS_DBG_RETVM_IF(err < 0, MS_MEDIA_ERR_INTERNAL, "fifo write failed");
+ MS_DBG_RETVM_IF(err < 0, MS_MEDIA_ERR_INTERNAL, "fifo write failed[%d]", err_no);
if (send_msg->msg_type != MS_MSG_DIRECTORY_SCANNING_CANCEL)
ms_req_num++;