summaryrefslogtreecommitdiffstats
path: root/src/daemon/Daemon.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-08-31 14:39:57 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2010-08-31 14:39:57 +0200
commite448ad512e34bdcca527bde0b301de404011fff5 (patch)
tree053197f8853f167323f99178c098e4f6cb13dfda /src/daemon/Daemon.cpp
parentcfc620a36d2052f6b2fb6c6fa5acb10c1187819e (diff)
parent236104f6d07a44463c164074723c16421831e8e2 (diff)
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/daemon/Daemon.cpp')
-rw-r--r--src/daemon/Daemon.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/daemon/Daemon.cpp b/src/daemon/Daemon.cpp
index 83fc46ec..ac845b1f 100644
--- a/src/daemon/Daemon.cpp
+++ b/src/daemon/Daemon.cpp
@@ -16,9 +16,6 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
#if HAVE_LOCALE_H
# include <locale.h>
#endif
@@ -504,18 +501,19 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
if (g_settings_nMaxCrashReportsSize > 0)
{
- std::string worst_dir;
+ char *worst_dir = NULL;
while (g_settings_nMaxCrashReportsSize > 0
&& get_dirsize_find_largest_dir(DEBUG_DUMPS_DIR, &worst_dir, name) / (1024*1024) >= g_settings_nMaxCrashReportsSize
- && worst_dir != ""
+ && worst_dir
) {
- log("Size of '%s' >= %u MB, deleting '%s'", DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize, worst_dir.c_str());
+ log("Size of '%s' >= %u MB, deleting '%s'", DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize, worst_dir);
g_pCommLayer->QuotaExceed(_("The size of the report exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."));
/* deletes both directory and DB record */
- char *d = concat_path_file(DEBUG_DUMPS_DIR, worst_dir.c_str());
+ char *d = concat_path_file(DEBUG_DUMPS_DIR, worst_dir);
+ free(worst_dir);
+ worst_dir = NULL;
DeleteDebugDump_by_dir(d);
free(d);
- worst_dir = "";
}
}