mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
another MAX_DGRAMS fix.
This commit is contained in:
parent
ee672bb3a3
commit
bb5e0c9c63
@ -598,7 +598,7 @@ bool UdpServer::sendRequest ( char *msg ,
|
||||
freeUdpSlot_ass ( slot );
|
||||
if ( flipped ) interruptsOn();
|
||||
return log("udp: Failed to initialize udp socket for "
|
||||
"sending.");
|
||||
"sending req: %s",mstrerror(g_errno));
|
||||
}
|
||||
// set this
|
||||
slot->m_maxResends = maxResends;
|
||||
@ -742,10 +742,12 @@ void UdpServer::sendReply_ass ( char *msg ,
|
||||
maxWait ,
|
||||
NULL ,
|
||||
0 ) ) {
|
||||
log("udp: Failed to initialize udp socket for sending.");
|
||||
log("udp: Failed to initialize udp socket for sending "
|
||||
"reply: %s", mstrerror(g_errno));
|
||||
mfree ( alloc , allocSize , "UdpServer");
|
||||
if ( flipped ) interruptsOn();
|
||||
if ( ! g_inSigHandler ) sendErrorReply ( slot , EBADENGINEER );
|
||||
// was EBADENGINEER
|
||||
if ( ! g_inSigHandler ) sendErrorReply ( slot , g_errno);
|
||||
return ;
|
||||
}
|
||||
// set the callback2 , it might not be NULL if we're recording stats
|
||||
|
@ -291,7 +291,6 @@ bool UdpSlot::sendSetup ( char *msg ,
|
||||
|
||||
// can't be too big
|
||||
if ( msgSize / m_maxDgramSize + 1 >= MAX_DGRAMS ) {
|
||||
g_errno = EMSGTOOBIG;//EBADENGINEER;
|
||||
int32_t maxMsgSize = m_maxDgramSize * MAX_DGRAMS;
|
||||
log(LOG_LOGIC,"udp: Msg size of %"INT32" bytes is too big "
|
||||
"to send. Max dgram size = %"INT32". Max dgrams = "
|
||||
@ -301,7 +300,8 @@ bool UdpSlot::sendSetup ( char *msg ,
|
||||
(int32_t)msgSize,(int32_t)m_maxDgramSize,
|
||||
(int32_t)MAX_DGRAMS,maxMsgSize,
|
||||
msgType);
|
||||
char *xx=NULL; *xx=0;
|
||||
//char *xx=NULL; *xx=0;
|
||||
g_errno = EMSGTOOBIG;//EBADENGINEER;
|
||||
return false;
|
||||
//msgSize = MAX_DGRAMS * DGRAM_SIZE;
|
||||
//sleep(50000);
|
||||
|
@ -15953,7 +15953,10 @@ char **XmlDoc::gotHttpReply ( ) {
|
||||
// make the whole thing empty? some websites return compressed replies
|
||||
// even though we do not ask for them. and then the compression
|
||||
// is corrupt.
|
||||
if ( saved == ECORRUPTHTTPGZIP ) {
|
||||
if ( saved == ECORRUPTHTTPGZIP ||
|
||||
// if somehow we got a page too big for MAX_DGRAMS... treat
|
||||
// it like an empty page...
|
||||
saved == EMSGTOOBIG ) {
|
||||
// free it i guess
|
||||
mfree ( m_httpReply, m_httpReplyAllocSize, "XmlDocHR" );
|
||||
// and reset it
|
||||
|
Loading…
Reference in New Issue
Block a user