forked from Mirrors/privacore-open-source-search-engine
Merge branch 'master' of https://github.com/privacore/open-source-search-engine
This commit is contained in:
26
Tagdb.cpp
26
Tagdb.cpp
@ -16,7 +16,6 @@
|
||||
#include "GbMutex.h"
|
||||
#include "ScopedLock.h"
|
||||
|
||||
static void gotMsg0ReplyWrapper ( void *state );
|
||||
|
||||
static HashTableX s_ht;
|
||||
static bool s_initialized = false;
|
||||
@ -1204,9 +1203,26 @@ static bool s_cacheInitialized = false;
|
||||
static RdbCache s_cache;
|
||||
static GbMutex s_cacheInitializedMutex;
|
||||
|
||||
Msg8a::Msg8a() {
|
||||
m_replies = 0;
|
||||
m_requests = 0;
|
||||
|
||||
Msg8a::Msg8a()
|
||||
: m_url(NULL),
|
||||
m_collnum(-1),
|
||||
m_callback(NULL),
|
||||
m_state(NULL),
|
||||
//m_msg0s
|
||||
//m_siteStartKey
|
||||
//m_siteEndKey
|
||||
m_niceness(0),
|
||||
m_dom(NULL),
|
||||
m_hostEnd(NULL),
|
||||
m_p(NULL),
|
||||
m_requests(0), m_replies(0),
|
||||
m_doneLaunching(false),
|
||||
m_errno(0),
|
||||
m_tagRec(NULL),
|
||||
m_state2(NULL),
|
||||
m_state3(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
Msg8a::~Msg8a ( ) {
|
||||
@ -1516,7 +1532,7 @@ bool Msg8a::launchGetRequests ( ) {
|
||||
return (m_requests == m_replies);
|
||||
}
|
||||
|
||||
static void gotMsg0ReplyWrapper ( void *state ) {
|
||||
void Msg8a::gotMsg0ReplyWrapper ( void *state ) {
|
||||
Msg8aState *msg8aState = (Msg8aState*)state;
|
||||
|
||||
Msg8a *msg8a = msg8aState->m_msg8a;
|
||||
|
6
Tagdb.h
6
Tagdb.h
@ -214,9 +214,12 @@ class Msg8a {
|
||||
bool getTagRec( Url *url, collnum_t collnum, int32_t niceness, void *state, void (*callback)( void * ),
|
||||
TagRec *tagRec );
|
||||
|
||||
private:
|
||||
bool launchGetRequests();
|
||||
void gotAllReplies ( ) ;
|
||||
|
||||
static void gotMsg0ReplyWrapper(void *);
|
||||
|
||||
// some specified input
|
||||
Url *m_url;
|
||||
|
||||
@ -238,13 +241,14 @@ class Msg8a {
|
||||
|
||||
int32_t m_requests;
|
||||
int32_t m_replies;
|
||||
char m_doneLaunching;
|
||||
bool m_doneLaunching;
|
||||
|
||||
int32_t m_errno;
|
||||
|
||||
// we set this for the caller
|
||||
TagRec *m_tagRec;
|
||||
|
||||
public:
|
||||
// hack for MsgE
|
||||
void *m_state2;
|
||||
void *m_state3;
|
||||
|
Reference in New Issue
Block a user