[tracker] libtracker-miner: Disable monitoring when dealing with unknown monitors



commit 5a318139d53a7e87ccc36c9db4ab586143aec1ca
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Oct 18 23:29:26 2017 +0200

    libtracker-miner: Disable monitoring when dealing with unknown monitors
    
    We just can't do safe assumptions about its limits or behavior, seems
    best to turn monitoring off altogether.

 src/libtracker-miner/tracker-monitor.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index fdd6c02..991248c 100644
--- a/src/libtracker-miner/tracker-monitor.c
+++ b/src/libtracker-miner/tracker-monitor.c
@@ -299,12 +299,9 @@ tracker_monitor_init (TrackerMonitor *object)
                }
                else {
                        /* Unknown */
-                       g_warning ("Monitor backend:'%s' is unknown, we have no limits "
-                                  "in place because we don't know what we are dealing with!",
+                       g_warning ("Monitor backend:'%s' is unhandled. Monitoring will be disabled",
                                   name);
-
-                       /* Guessing limit... */
-                       priv->monitor_limit = 100;
+                       priv->enabled = FALSE;
                }
 
                g_file_monitor_cancel (monitor);
@@ -312,7 +309,9 @@ tracker_monitor_init (TrackerMonitor *object)
        }
 
        g_object_unref (file);
-       g_debug ("Monitor limit is %d", priv->monitor_limit);
+
+       if (priv->enabled)
+               g_debug ("Monitor limit is %d", priv->monitor_limit);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]