fix long-standing core when getting linkinfo

from a collection that got nuked.
This commit is contained in:
Matt Wells
2014-07-16 10:40:12 -07:00
parent 3ad667765a
commit dc7a78687c
2 changed files with 12 additions and 7 deletions

@ -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;

@ -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