Fix bug that media-scanner does not shut down 98/231398/3 accepted/tizen/unified/20200422.215428 submit/tizen/20200422.001719
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:03:58 +0000 (09:03 +0900)
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 2fb93b9..57c4848 100644 (file)
@@ -295,7 +295,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;
 }