提交 e8407ab1 authored 作者: Moises Silva's avatar Moises Silva

mod_logfile: Fix compilation that was broken due to previous merge

             Note that we no longer use our custom-made log rotation
             as the FreeSWITCH mainstream project added that feature
             we just re-use the same feature with a different parameter
上级 94ceff68
......@@ -116,8 +116,6 @@ static switch_status_t mod_logfile_openlogfile(logfile_profile_t *profile, switc
static switch_status_t mod_logfile_rotate(logfile_profile_t *profile)
{
unsigned int i = 0;
unsigned int fcount = 0;
const char *fname = NULL;
char *filename = NULL;
switch_status_t stat = 0;
int64_t offset = 0;
......@@ -125,15 +123,6 @@ static switch_status_t mod_logfile_rotate(logfile_profile_t *profile)
switch_time_exp_t tm;
char date[80] = "";
switch_size_t retsize;
char *dend = NULL;
char *hay = NULL;
switch_dir_t *dirhandle = NULL;
switch_time_t wtime = 0;
char dirname[128];
char filebuf[128];
char fullfile[512];
char filetodelete[128];
switch_finfo_t statinfo;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_mutex_lock(globals.mutex);
......@@ -344,8 +333,8 @@ static switch_status_t load_profile(switch_xml_t xml)
new_profile->logfile = strdup(val);
} else if (!strcmp(var, "rollover")) {
new_profile->roll_size = switch_atoui(val);
} else if (!strcmp(var, "maximum-rotate")) ||
(!strcmp(var, "maxfilecount")) {
} else if (!strcmp(var, "maximum-rotate") ||
!strcmp(var, "maxfilecount")) {
/* maxfilecount is backwards compatible parameter, we had our own log rotation code
* and eventually mainstream FreeSWITCH included the parameter maximum-rotate which
* did pretty much the same as ours, I deleted the old code and stayed with the official
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论