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

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