Adds checking file existence 77/230577/4
authorJaechul Lee <jcsing.lee@samsung.com>
Mon, 13 Apr 2020 00:54:31 +0000 (09:54 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Mon, 13 Apr 2020 07:41:19 +0000 (16:41 +0900)
[Version] 0.12.71
[Issue Type] Bug

Change-Id: I3f8450ec6431851cb84e205d9d5b90e30a645859
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
mm_sound_proxy.c
packaging/libmm-sound.spec

index 8a8d9264d0fc48e35ebf14485c9adfbf2e2352aa..f322e288c57414be1cba80530a6b90d1fd7c83f4 100644 (file)
@@ -941,6 +941,13 @@ int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat,
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
+       if (access(filename, F_OK) != 0) {
+               char str_error[256];
+               strerror_r(errno, str_error, sizeof(str_error));
+               debug_error("file [%s] doesn't exists : [%s][%d]", filename, str_error, errno);
+               return MM_ERROR_SOUND_FILE_NOT_FOUND;
+       }
+
        debug_fenter();
 
        if ((params = g_variant_new("(siisi)", filename, repeat, client_pid, stream_type, stream_id)) == NULL) {
index 48a508636ef8c832bf5ec3d5bfbed46714f7d5bb..a9000a38c3c3f492a87bb66024659bdbc5dc88db 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.12.70
+Version:    0.12.71
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0