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 8a8d926..f322e28 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 48a5086..a9000a3 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