Remove unused variables

This commit is contained in:
Ai Lin Chia
2016-02-22 11:48:21 +01:00
parent 85b942f42f
commit 015fcfbb32
3 changed files with 8 additions and 47 deletions

@ -159,15 +159,9 @@ bool Msg20::getSummary ( Msg20Request *req ) {
? multicast_msg20_summary_timeout
: multicast_infinite_send_timeout;
// for diffbot make timeout super long so we aren't tripped up
// by dead hosts that aren't really dead.
// CollectionRec *cr = g_collectiondb.getRec ( req->m_collnum );
// if ( cr && cr->m_isCustomCrawl && req->m_niceness == 0 )
// timeout = 300;
// get our group
int32_t allNumHosts = g_hostdb.getNumHostsPerShard();
Host *allHosts = g_hostdb.getShard ( shardNum );//getGroup(groupId );
Host *allHosts = g_hostdb.getShard ( shardNum );
// put all alive hosts in this array
Host *cand[32];
@ -203,7 +197,7 @@ bool Msg20::getSummary ( Msg20Request *req ) {
// route based on docid region, not parity, because we want to hit
// the urldb page cache as much as possible
int64_t sectionWidth =((128LL*1024*1024)/nc)+1;//(DOCID_MASK/nc)+1LL;
int64_t sectionWidth =((128LL*1024*1024)/nc)+1;
int64_t probDocId = req->m_docId;
// i think reference pages just pass in a url to get the summary
if ( probDocId < 0 && req->size_ubuf )
@ -279,15 +273,6 @@ void gotReplyWrapper20 ( void *state , void *state2 ) {
else THIS->m_callback2 ( THIS->m_state );
}
/*
void gotReplyWrapper20b ( void *state , UdpSlot *slot ) {
Msg20 *THIS = (Msg20 *)state;
// gotReply() does not block, and does NOT call our callback
THIS->gotReply ( slot ) ;
THIS->m_callback ( THIS->m_state );
}
*/
// . set m_reply/m_replySize to the reply
void Msg20::gotReply ( UdpSlot *slot ) {
// we got the reply
@ -353,12 +338,6 @@ void Msg20::gotReply ( UdpSlot *slot ) {
m_ownReply = true;
// deserialize it, sets g_errno on error??? not yet TODO!
m_r->deserialize();
// log("msg20: got msg20=0x%"PTRFMT" msg20reply=0x%"PTRFMT" slot=0x%"PTRFMT" s_tmp=%i"
// ,(PTRTYPE)this
// ,(PTRTYPE)m_r
// ,(PTRTYPE)slot
// ,s_tmp);
}
// . this is called

25
Msg20.h

@ -148,14 +148,15 @@ public:
// exclude these strings which were "cleared". Used by Msg40 to
// reduce the memory required for caching the Msg40 which includes an
// array of Msg20s.
//void clearBigSample ( ) { size_sbuf = 0; };
void clearOutlinks ( ) {
size_linkText = 0;
size_surroundingText = 0;
//size_linkInfo = 0;
size_outlinks = 0;
};
void clearVectors ( ) { size_vbuf = 0; };
}
void clearVectors() {
size_vbuf = 0;
}
// a new one for getting the display contents sequentially used
// by Msg24.cpp. this routine is the exclusive user of the "next"
@ -184,14 +185,12 @@ public:
collnum_t m_collnum ; // collection # we came from
char m_noArchive ;
char m_contentType ;
//char m_docQuality ;
char m_siteRank ;
char m_isBanned ;
char m_isFiltered ;
char m_hasLinkToOurDomOrHost;
char m_urlFilterNum ;
char m_hopcount ;
//char m_flags3 ;
char m_recycled ;
uint8_t m_language ;
uint8_t m_summaryLanguage ;
@ -216,7 +215,6 @@ public:
int32_t m_linkTextNumWords ;
int32_t m_midDomHash ; // set for m_getLinkText
int32_t m_reserved1 ; // adIdHash
void *m_parentOwner;
char m_isLinkSpam ; // set for m_getLinkText
@ -244,11 +242,7 @@ public:
char *ptr_vbuf ; // summary vector
char *ptr_imgData ; // for encoded images
char *ptr_facetBuf ;
int32_t *ptr_catIds ;
int32_t *ptr_indCatIds ;
char *ptr_site ;
char *ptr_reserved0 ;
// . if m_computeLinkInfo is true this is computed using Msg25 (fresh)
// . if m_setLinkInfo is true this is just set from the titleRec
@ -297,12 +291,9 @@ public:
int32_t size_imgData ;
int32_t size_facetBuf ;
int32_t size_catIds ;
int32_t size_indCatIds ;
int32_t size_site ;
int32_t size_reserved0 ;
int32_t size_linkInfo;//inlinks ;
int32_t size_linkInfo ;
int32_t size_outlinks ;
int32_t size_vector1 ;
@ -329,10 +320,6 @@ public:
// . this whole class is cast to a udp reply, so the size of "buf"
// depends on the size of that udp reply
char m_buf[0];
int32_t getCatId (int32_t i){return ((int32_t *)ptr_catIds)[i]; };
int32_t getIndCatId (int32_t i){return ((int32_t *)ptr_indCatIds)[i];};
};
class Msg20 {

@ -22731,11 +22731,6 @@ Msg20Reply *XmlDoc::getMsg20Reply ( ) {
int32_t rulen = 0;
if ( ru ) rulen = gbstrlen(ru)+1;
// One reserved list. Previously held ad ids (so links could be marked
// as spammy based on ads found)
reply->ptr_reserved0 = NULL;
reply->size_reserved0 = 0;
// need full cached page of each search result?
// include it always for spider status docs.
if ( m_req->m_includeCachedCopy || m_contentType == CT_STATUS ) {