mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
fix core in "wait in line" logic
when getting link info in Linkdb.cpp.
This commit is contained in:
parent
af9eb8fb73
commit
365fc16606
14
Linkdb.cpp
14
Linkdb.cpp
@ -645,7 +645,10 @@ static void sendReplyWrapper ( void *state ) {
|
||||
nextLink:
|
||||
|
||||
UdpSlot *udpSlot = req->m_udpSlot;
|
||||
|
||||
|
||||
// update for next udpSlot
|
||||
req = req->m_next;
|
||||
|
||||
// just dup the reply for each one
|
||||
char *reply2 = (char *)mdup(reply1,replySize,"m25repd");
|
||||
|
||||
@ -666,7 +669,6 @@ static void sendReplyWrapper ( void *state ) {
|
||||
}
|
||||
|
||||
// if we had a link
|
||||
req = req->m_next;
|
||||
if ( req ) goto nextLink;
|
||||
|
||||
// the destructor
|
||||
@ -684,6 +686,10 @@ void handleRequest25 ( UdpSlot *slot , long netnice ) {
|
||||
// make sure this always NULL for our linked list logic
|
||||
req->m_next = NULL;
|
||||
|
||||
// udp socket for sending back the final linkInfo in m_linkInfoBuf
|
||||
// used by sendReply()
|
||||
req->m_udpSlot = slot;
|
||||
|
||||
// set up the hashtable if our first time
|
||||
if ( ! g_lineTable.isInitialized() )
|
||||
g_lineTable.set ( 8,4,256,NULL,0,false,MAX_NICENESS,"lht25");
|
||||
@ -735,10 +741,6 @@ void handleRequest25 ( UdpSlot *slot , long netnice ) {
|
||||
// point to a real safebuf here for populating with data
|
||||
m25->m_linkInfoBuf = &m25->m_realBuf;
|
||||
|
||||
// udp socket for sending back the final linkInfo in m_linkInfoBuf
|
||||
// used by sendReply()
|
||||
req->m_udpSlot = slot;
|
||||
|
||||
// set some new stuff. should probably be set in getLinkInfo2()
|
||||
// but we are trying to leave that as unaltered as possible to
|
||||
// try to reduce debugging.
|
||||
|
Loading…
Reference in New Issue
Block a user