[core] recordFile add log on missing file argument

This commit is contained in:
agree 2022-07-03 19:46:12 -04:00 committed by GitHub
parent 7a41bdeb40
commit 13e75843e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1300,7 +1300,11 @@ SWITCH_DECLARE(int) CoreSession::recordFile(char *file_name, int time_limit, int
this_check(-1); this_check(-1);
sanity_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)); memset(&local_fh, 0, sizeof(local_fh));
fhp = &local_fh; fhp = &local_fh;
local_fh.thresh = silence_threshold; local_fh.thresh = silence_threshold;