moved routine around to avoid link issues

This commit is contained in:
Jean-Francois Dockes 2011-10-06 13:48:57 +02:00
parent eda494153e
commit 61bf17aa46
2 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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;
}
}