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

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