Blame SOURCES/0250-lib-check_recent_crash_file-do-not-produce-error_msg.patch

baab13
From c6e54a5eaacab21a56c41c4b138e800f6aa15faf Mon Sep 17 00:00:00 2001
baab13
From: Matej Habrnal <mhabrnal@redhat.com>
baab13
Date: Tue, 8 Dec 2015 16:33:31 +0100
baab13
Subject: [PATCH] lib: check_recent_crash_file do not produce error_msg
baab13
baab13
Regarding to the desire to unite log messages in abrt-hook-ccpp,
baab13
we need to erase loging from check_recent_crash_file() function and let the
baab13
loging on caller of the function.
baab13
baab13
Related to rhbz#1337186
baab13
baab13
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
baab13
---
baab13
 src/daemon/abrt-server.c          | 3 +++
baab13
 src/lib/check_recent_crash_file.c | 1 -
baab13
 2 files changed, 3 insertions(+), 1 deletion(-)
baab13
baab13
diff --git a/src/daemon/abrt-server.c b/src/daemon/abrt-server.c
baab13
index a0faef6..9a1361b 100644
baab13
--- a/src/daemon/abrt-server.c
baab13
+++ b/src/daemon/abrt-server.c
baab13
@@ -885,7 +885,10 @@ static int perform_http_xact(void)
baab13
         int repeating_crash = check_recent_crash_file(last_file, executable);
baab13
         free(last_file);
baab13
         if (repeating_crash) /* Only pretend that we saved it */
baab13
+        {
baab13
+            error_msg("Not saving repeating crash in '%s'", executable);
baab13
             goto out; /* ret is 0: "success" */
baab13
+        }
baab13
     }
baab13
 
baab13
 #if 0
baab13
diff --git a/src/lib/check_recent_crash_file.c b/src/lib/check_recent_crash_file.c
baab13
index 63db260..2df6aff 100644
baab13
--- a/src/lib/check_recent_crash_file.c
baab13
+++ b/src/lib/check_recent_crash_file.c
baab13
@@ -44,7 +44,6 @@ int check_recent_crash_file(const char *filename, const char *executable)
baab13
             buf[sz] = '\0';
baab13
             if (strcmp(executable, buf) == 0)
baab13
             {
baab13
-                error_msg("Not saving repeating crash in '%s'", executable);
baab13
                 close(fd);
baab13
                 return 1;
baab13
             }
baab13
-- 
baab13
1.8.3.1
baab13