Fix bug that media-scanner does not shut down 00/231400/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20200423.232621 accepted/tizen/5.5/unified/wearable/hotfix/20201027.112450 submit/tizen_5.5/20200422.001555 submit/tizen_5.5/20200423.075012 submit/tizen_5.5_wearable_hotfix/20201026.184304
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 21 Apr 2020 23:46:09 +0000 (08:46 +0900)
committerMinje ahn <minje.ahn@samsung.com>
Wed, 22 Apr 2020 00:17:24 +0000 (00:17 +0000)
There is no response to the cancelled request.
So do not increase req count.

Change-Id: I6a265f6715d6c6a195339f4584a95e6a9a351d20
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/server/media-server-socket.c

index 5a7bcc6..20ece07 100644 (file)
@@ -297,7 +297,8 @@ static int __ms_send_request(ms_comm_msg_s *send_msg)
        close(fd);
        MS_DBG_RETVM_IF(err < 0, MS_MEDIA_ERR_INTERNAL, "fifo write failed");
 
-       ms_req_num++;
+       if (send_msg->msg_type != MS_MSG_DIRECTORY_SCANNING_CANCEL)
+               ms_req_num++;
 
        return MS_MEDIA_ERR_NONE;
 }