Merge pull request #1494 in FS/freeswitch from ~HUNYI/freeswitch:feature/FS-11046-better-logging-for-rename_function to master
* commit '74f47cb0eddf42bcf37c5b8fef225f95f51cabc6': FS-11046: [mod_dptools] Better logging for rename_function
This commit is contained in:
commit
e2231715f4
|
@ -657,10 +657,15 @@ SWITCH_STANDARD_APP(rename_function)
|
|||
|
||||
if (!zstr(data) && (lbuf = switch_core_session_strdup(session, data))
|
||||
&& switch_split(lbuf, ' ', argv) == 2) {
|
||||
switch_file_rename(argv[0], argv[1], switch_core_session_get_pool(session));
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s RENAME: %s %s\n",
|
||||
switch_channel_get_name(switch_core_session_get_channel(session)), argv[0], argv[1]);
|
||||
|
||||
if (switch_file_rename(argv[0], argv[1], switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s Can't rename %s to %s\n",
|
||||
switch_channel_get_name(switch_core_session_get_channel(session)), argv[0], argv[1]);
|
||||
}
|
||||
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", RENAME_SYNTAX);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue