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

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