Switch to unified view

a/src/query/docseq.cpp b/src/query/docseq.cpp
...
...
20
#include "filtseq.h"
20
#include "filtseq.h"
21
#include "sortseq.h"
21
#include "sortseq.h"
22
#include "log.h"
22
#include "log.h"
23
#include "internfile.h"
23
#include "internfile.h"
24
24
25
PTMutexInit DocSequence::o_dblock;
25
std::mutex DocSequence::o_dblock;
26
string DocSequence::o_sort_trans;
26
string DocSequence::o_sort_trans;
27
string DocSequence::o_filt_trans;
27
string DocSequence::o_filt_trans;
28
28
29
int DocSequence::getSeqSlice(int offs, int cnt, vector<ResListEntry>& result)
29
int DocSequence::getSeqSlice(int offs, int cnt, vector<ResListEntry>& result)
30
{
30
{
...
...
44
    Rcl::Db *db = getDb();
44
    Rcl::Db *db = getDb();
45
    if (db == 0) {
45
    if (db == 0) {
46
    LOGERR("DocSequence::getEnclosing: no db\n" );
46
    LOGERR("DocSequence::getEnclosing: no db\n" );
47
    return false;
47
    return false;
48
    }
48
    }
49
    PTMutexLocker locker(o_dblock);
49
    std::unique_lock<std::mutex> locker(o_dblock);
50
    string udi;
50
    string udi;
51
    if (!FileInterner::getEnclosingUDI(doc, udi))
51
    if (!FileInterner::getEnclosingUDI(doc, udi))
52
        return false;
52
        return false;
53
53
54
    bool dbret =  db->getDoc(udi, doc, pdoc);
54
    bool dbret =  db->getDoc(udi, doc, pdoc);