summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2010-06-30 14:52:31 +0200
committerNikola Pajkovsky <npajkovs@redhat.com>2010-06-30 14:52:31 +0200
commitf03229adae00b083d70dda9ca10f2317aa122246 (patch)
treeb3793b22138dcec648ef47ddc46569ce2fa6e0c3
parente04fc8effd469803811435111bb22fb5a6db44b8 (diff)
downloadabrt-f03229adae00b083d70dda9ca10f2317aa122246.tar.gz
abrt-f03229adae00b083d70dda9ca10f2317aa122246.tar.xz
abrt-f03229adae00b083d70dda9ca10f2317aa122246.zip
unlimited MaxCrashReportsSize
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
-rw-r--r--src/Daemon/Daemon.cpp23
-rw-r--r--src/Daemon/abrt.conf2
2 files changed, 14 insertions, 11 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index 02b8b96e..3ba8d4d2 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -506,16 +506,19 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
}
log("Directory '%s' creation detected", name);
- std::string worst_dir;
- while (g_settings_nMaxCrashReportsSize > 0
- && get_dirsize_find_largest_dir(DEBUG_DUMPS_DIR, &worst_dir, name) / (1024*1024) >= g_settings_nMaxCrashReportsSize
- && worst_dir != ""
- ) {
- log("Size of '%s' >= %u MB, deleting '%s'", DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize, worst_dir.c_str());
- g_pCommLayer->QuotaExceed(_("Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."));
- /* deletes both directory and DB record */
- DeleteDebugDump_by_dir(concat_path_file(DEBUG_DUMPS_DIR, worst_dir.c_str()).c_str());
- worst_dir = "";
+ if (g_settings_nMaxCrashReportsSize > 0)
+ {
+ std::string worst_dir;
+ while (g_settings_nMaxCrashReportsSize > 0
+ && get_dirsize_find_largest_dir(DEBUG_DUMPS_DIR, &worst_dir, name) / (1024*1024) >= g_settings_nMaxCrashReportsSize
+ && worst_dir != ""
+ ) {
+ log("Size of '%s' >= %u MB, deleting '%s'", DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize, worst_dir.c_str());
+ g_pCommLayer->QuotaExceed(_("Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."));
+ /* deletes both directory and DB record */
+ DeleteDebugDump_by_dir(concat_path_file(DEBUG_DUMPS_DIR, worst_dir.c_str()).c_str());
+ worst_dir = "";
+ }
}
try
diff --git a/src/Daemon/abrt.conf b/src/Daemon/abrt.conf
index b88b6b96..534aef8f 100644
--- a/src/Daemon/abrt.conf
+++ b/src/Daemon/abrt.conf
@@ -29,7 +29,7 @@ Database = SQLite3
#
#WatchCrashdumpArchiveDir = /var/spool/abrt-upload
-# Max size for crash storage [MiB]
+# Max size for crash storage [MiB] or 0 for unlimited
#
MaxCrashReportsSize = 1000