From 13e75843e1a4c6bfe0b1c31194b0eae7090f3008 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Sun, 3 Jul 2022 19:46:12 -0400 Subject: [PATCH] [core] recordFile add log on missing file argument --- src/switch_cpp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index fe71a6400a..f1c1727452 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -1300,7 +1300,11 @@ SWITCH_DECLARE(int) CoreSession::recordFile(char *file_name, int time_limit, int this_check(-1); sanity_check(-1); - if (!file_name) return 0; + if (!file_name) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No file specified.\n"); + return 0; + } + memset(&local_fh, 0, sizeof(local_fh)); fhp = &local_fh; local_fh.thresh = silence_threshold;