From 599ddc83e674c20c7a630a9261dbb03355a2970e Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 21 May 2018 18:37:31 +0900 Subject: [PATCH] Check return value of setting recorder filename Change-Id: Ie10862585d5526b41c63897ff6c89a4169fef107 Signed-off-by: Jihoon Kim --- src/voice-recorder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/voice-recorder.cpp b/src/voice-recorder.cpp index 3727b38..b30e5e3 100644 --- a/src/voice-recorder.cpp +++ b/src/voice-recorder.cpp @@ -196,7 +196,10 @@ static void _recorder_apply_settings(voice_recorder *recorder) if (error_code != RECORDER_ERROR_NONE) LOGW("Failed to set time limit. error code : %d", error_code); - recorder_set_filename(recorder->recorder, recorder->file_path); + error_code = recorder_set_filename(recorder->recorder, recorder->file_path); + if (error_code != RECORDER_ERROR_NONE) + LOGW("Failed to set filename. error code : %d", error_code); + error_code = recorder_set_file_format(recorder->recorder, recorder->file_format); if (error_code != RECORDER_ERROR_NONE) LOGW("Failed to set file format. error code : %d", error_code); -- 2.7.4