Remove extra unlink
authorTim Pepper <timothy.c.pepper@linux.intel.com>
Tue, 18 Sep 2012 15:17:14 +0000 (08:17 -0700)
committerTim Pepper <timothy.c.pepper@linux.intel.com>
Tue, 18 Sep 2012 15:17:14 +0000 (08:17 -0700)
This was the unlink of the actually processed file.  The primary duplicate
detection is in move_core().  Due to the two phases of processing in
scan_corefolder() it is a fully normal path for a core to get added
to the work queue and then a second add attempt likely happens at
reprocess_corefile().

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
src/coredump.c

index 190938e..ffe2562 100644 (file)
@@ -728,11 +728,6 @@ static int add_to_processing(char *fullpath)
        pthread_mutex_lock(&core_status.processing_mtx);
        if (g_hash_table_lookup(core_status.processing_oops, c2)) {
                pthread_mutex_unlock(&core_status.processing_mtx);
-               /* This should only happen when the same core happened
-                * multiple times in the same second.  Go ahead and
-                * ignore/remove the newer one here */
-               fprintf(stderr, "+ ...ignoring/unlinking %s\n", fullpath);
-               unlink(fullpath);
                goto clean_add_to_processing;
        }