a/src/index/rclmonprc.cpp b/src/index/rclmonprc.cpp
1
#include "autoconfig.h"
1
#include "autoconfig.h"
2
2
3
#ifdef RCL_MONITOR
3
#ifdef RCL_MONITOR
4
#ifndef lint
4
#ifndef lint
5
static char rcsid[] = "@(#$Id: rclmonprc.cpp,v 1.8 2006-12-21 10:08:07 dockes Exp $ (C) 2006 J.F.Dockes";
5
static char rcsid[] = "@(#$Id: rclmonprc.cpp,v 1.9 2006-12-23 13:07:21 dockes Exp $ (C) 2006 J.F.Dockes";
6
#endif
6
#endif
7
/*
7
/*
8
 *   This program is free software; you can redistribute it and/or modify
8
 *   This program is free software; you can redistribute it and/or modify
9
 *   it under the terms of the GNU General Public License as published by
9
 *   it under the terms of the GNU General Public License as published by
10
 *   the Free Software Foundation; either version 2 of the License, or
10
 *   the Free Software Foundation; either version 2 of the License, or
...
...
36
#include "debuglog.h"
36
#include "debuglog.h"
37
#include "rclmon.h"
37
#include "rclmon.h"
38
#include "debuglog.h"
38
#include "debuglog.h"
39
#include "indexer.h"
39
#include "indexer.h"
40
#include "pathut.h"
40
#include "pathut.h"
41
#include "x11mon.h"
41
42
42
typedef map<string, RclMonEvent> queue_type;
43
typedef map<string, RclMonEvent> queue_type;
43
44
44
/** Private part of RclEQ: things that we don't wish to exist in the interface
45
/** Private part of RclEQ: things that we don't wish to exist in the interface
45
 *  include file.
46
 *  include file.
...
...
159
160
160
extern int stopindexing;
161
extern int stopindexing;
161
162
162
bool RclMonEventQueue::ok()
163
bool RclMonEventQueue::ok()
163
{
164
{
164
    if (m_data == 0)
165
    if (m_data == 0) {
166
  LOGDEB(("RclMonEventQueue: not ok: bad state\n"));
165
    return false;
167
    return false;
166
    return !stopindexing && m_data->m_ok;
168
    }
169
    if (!x11IsAlive()) {
170
  LOGDEB(("RclMonEventQueue: not ok: x11\n"));
171
  return false;
172
    }
173
    if (stopindexing) {
174
  LOGDEB(("RclMonEventQueue: not ok: stop request\n"));
175
  return false;
176
    }
177
    if (!m_data->m_ok) {
178
  LOGDEB(("RclMonEventQueue: not ok: end from rcv\n"));
179
  return false;
180
    }
181
    return true;
167
}
182
}
168
183
169
void RclMonEventQueue::setTerminate()
184
void RclMonEventQueue::setTerminate()
170
{
185
{
171
    MONDEB(("RclMonEventQueue:: setTerminate\n"));
186
    MONDEB(("RclMonEventQueue:: setTerminate\n"));