From 61bf17aa46a3986efcc0b66001af52bb0832b5d7 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 6 Oct 2011 13:48:57 +0200 Subject: [PATCH] moved routine around to avoid link issues --- src/index/rclmonprc.cpp | 11 ----------- src/index/recollindex.cpp | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/index/rclmonprc.cpp b/src/index/rclmonprc.cpp index ac1bfb67..50f9418b 100644 --- a/src/index/rclmonprc.cpp +++ b/src/index/rclmonprc.cpp @@ -42,7 +42,6 @@ #include "recollindex.h" #include "pathut.h" #include "x11mon.h" -#include "rclionice.h" #include "subtreelist.h" typedef unsigned long mttcast; @@ -564,14 +563,4 @@ bool startMonitor(RclConfig *conf, int opts) return true; } - -void rclMonIonice(RclConfig *config) -{ - string clss, classdata; - if (!config->getConfParam("monioniceclass", clss) || clss.empty()) - clss = "3"; - config->getConfParam("monioniceclassdata", classdata); - rclionice(clss, classdata); -} - #endif // RCL_MONITOR diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index 1c3e552c..fa51e4e0 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -43,6 +43,7 @@ using namespace std; #include "beaglequeue.h" #include "recollindex.h" #include "fsindexer.h" +#include "rclionice.h" // Command line options static int op_flags; @@ -118,6 +119,15 @@ static bool makeIndexer(RclConfig *config) return true; } +void rclIxIonice(RclConfig *config) +{ + string clss, classdata; + if (!config->getConfParam("monioniceclass", clss) || clss.empty()) + clss = "3"; + config->getConfParam("monioniceclassdata", classdata); + rclionice(clss, classdata); +} + // Index a list of files. We just check that they belong to one of the // topdirs subtrees, and call the indexer method. // @@ -295,7 +305,7 @@ int main(int argc, const char **argv) LOGINFO(("recollindex: can't setpriority(), errno %d\n", errno)); } // Try to ionice. This does not work on all platforms - rclMonIonice(config); + rclIxIonice(config); if (op_flags & (OPT_i|OPT_e)) { lockorexit(&pidfile); @@ -360,7 +370,7 @@ int main(int argc, const char **argv) LOGINFO(("recollindex: can't setpriority(), errno %d\n", errno)); } // Try to ionice. This does not work on all platforms - rclMonIonice(config); + rclIxIonice(config); if (sleepsecs > 0) { LOGDEB(("recollindex: sleeping %d\n", sleepsecs)); @@ -411,3 +421,4 @@ int main(int argc, const char **argv) return !status; } } +