handle bad host sending us a c1 request
so we dont core
This commit is contained in:
@ -121,7 +121,7 @@ bool sendPageThreads ( TcpSocket *s , HttpRequest *r ) {
|
||||
int64_t took = (now - t->m_launchedTime);
|
||||
if(took <= 0) took = 1;
|
||||
p.safePrintf("<td>%c%c%c/%"INT32"</td>", '?','?','?',t->m_bytesToGo);
|
||||
p.safePrintf("<td>%.2f kbps</td>", 0.0);//(float)fs->m_bytesDone/took);
|
||||
p.safePrintf("<td>%.2f MB/s</td>", 0.0);//(float)fs->m_bytesDone/took);
|
||||
p.safePrintf("<td>%s</td>",t->m_doWrite? "Write":"Read");
|
||||
}
|
||||
else {
|
||||
|
@ -13680,6 +13680,14 @@ void handleRequestc1 ( UdpSlot *slot , int32_t niceness ) {
|
||||
|
||||
char *req = slot->m_readBuf;
|
||||
|
||||
if ( ! slot->m_host ) {
|
||||
log("handc1: no slot->m_host from ip=%s udpport=%i",
|
||||
iptoa(slot->m_ip),(int)slot->m_port);
|
||||
g_errno = ENOHOST;
|
||||
us->sendErrorReply ( slot , g_errno );
|
||||
return;
|
||||
}
|
||||
|
||||
//if ( ! isClockSynced() ) {
|
||||
//}
|
||||
|
||||
|
Reference in New Issue
Block a user