From e8407ab1e1300e27ce65f63be8b214355cf8d80a Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Tue, 31 Jan 2012 17:13:10 -0500 Subject: [PATCH] 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 --- src/mod/loggers/mod_logfile/mod_logfile.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/mod/loggers/mod_logfile/mod_logfile.c b/src/mod/loggers/mod_logfile/mod_logfile.c index 9e16f5d73e..27f0aeba37 100644 --- a/src/mod/loggers/mod_logfile/mod_logfile.c +++ b/src/mod/loggers/mod_logfile/mod_logfile.c @@ -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