Commit 7a168fe2 authored by Mike Hibler's avatar Mike Hibler
Browse files

more debug info on bad packets

parent cc2e08cc
......@@ -554,16 +554,14 @@ ServerRecvThread(void *arg)
if (! PacketValid(p, FileInfo.chunks)) {
struct in_addr ipaddr = { p->hdr.srcip };
log("received bad packet %d/%d from %s, ignored",
log("bad packet %d/%d from %s, ignored",
p->hdr.type, p->hdr.subtype, inet_ntoa(ipaddr));
#if 0
if (p->hdr.type == PKTTYPE_REQUEST &&
p->hdr.subtype == PKTSUBTYPE_REQUEST)
log(" len=%d, chunk=%d(%d), block=%d@%d\n",
(p->hdr.subtype == PKTSUBTYPE_REQUEST ||
p->hdr.subtype == PKTSUBTYPE_PREQUEST))
log(" len=%d, chunk=%d(%d), word2=%d",
p->hdr.datalen, p->msg.request.chunk,
FileInfo.chunks, p->msg.request.count,
FileInfo.chunks, p->msg.request.block);
gettimeofday(&LastReq, 0);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment