mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-16 02:46:08 -04:00
fix long-standing core when getting linkinfo
from a collection that got nuked.
This commit is contained in:
@ -1028,7 +1028,8 @@ bool Msg25::getLinkInfo2( char *site ,
|
||||
return doReadLoop();
|
||||
}
|
||||
|
||||
|
||||
// . returns false if blocked, returns true otherwise
|
||||
// . returns true and sets g_errno on error
|
||||
bool Msg25::doReadLoop ( ) {
|
||||
|
||||
//log("debug: entering doReadLoop this=%lx",(long)this);
|
||||
@ -1391,6 +1392,8 @@ bool Msg25::sendRequests ( ) {
|
||||
CollectionRec *cr = g_collectiondb.getRec ( m_collnum );
|
||||
if ( ! cr ) {
|
||||
log("linkdb: collnum %li is gone 1",(long)m_collnum);
|
||||
// that func doesn't set g_errno so we must
|
||||
g_errno = ENOCOLLREC;
|
||||
return true;
|
||||
}
|
||||
//char *coll = cr->m_coll;
|
||||
@ -2335,6 +2338,8 @@ bool Msg25::gotLinkText ( Msg20Request *req ) { // LinkTextReply *linkText ) {
|
||||
CollectionRec *cr = g_collectiondb.getRec ( m_collnum );
|
||||
if ( ! cr ) {
|
||||
log("linkdb: collnum %li is gone 2",(long)m_collnum);
|
||||
// that func doesn't set g_errno so we must
|
||||
g_errno = ENOCOLLREC;
|
||||
return true;
|
||||
}
|
||||
char *coll = cr->m_coll;
|
||||
|
12
XmlDoc.cpp
12
XmlDoc.cpp
@ -13187,12 +13187,12 @@ LinkInfo *XmlDoc::getLinkInfo1 ( ) {
|
||||
if ( g_errno ) return NULL;
|
||||
// panic! what the fuck? why did it return true and then
|
||||
// call our callback???
|
||||
if ( g_conf.m_logDebugBuild ) {
|
||||
log("build: xmldoc call to msg25 did not block");
|
||||
// must now block since it uses multicast now to
|
||||
// send the request onto the network
|
||||
char *xx=NULL;*xx=0;
|
||||
}
|
||||
//if ( g_conf.m_logDebugBuild ) {
|
||||
log("build: xmldoc call to msg25 did not block");
|
||||
// must now block since it uses multicast now to
|
||||
// send the request onto the network
|
||||
char *xx=NULL;*xx=0;
|
||||
//}
|
||||
}
|
||||
|
||||
// at this point assume its valid
|
||||
|
Reference in New Issue
Block a user