[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 30/116] libtracker-miner: Disable monitoring when dealing with unknown monitors



commit f543c29461e81b2309de453293549df78447485c
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 file changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index 79f439779..61075a642 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]