Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
f906a1a6
Commit
f906a1a6
authored
Dec 12, 2002
by
Mike Hibler
Browse files
Had an #ifdef wrong (and a syntax error inside it)
Add some additional debugging for bad packets (since I have seen some)
parent
a6cc917b
Changes
1
Hide whitespace changes
Inline
Side-by-side
os/frisbee.redux/server.c
View file @
f906a1a6
...
...
@@ -134,8 +134,8 @@ WorkQueueInit(void)
if
(
WorkQDelay
<
0
)
WorkQDelay
=
sleeptime
(
1000
,
"workQ check delay"
);
#ifdef
DO
STATS
chunkmap
=
calloc
(
File
i
nfo
.
blocks
,
1
);
#ifdef STATS
chunkmap
=
calloc
(
File
I
nfo
.
blocks
,
1
);
#endif
}
...
...
@@ -342,7 +342,7 @@ ClientRequest(Packet_t *p)
enqueued
=
WorkQueueEnqueue
(
chunk
,
block
,
count
);
if
(
!
enqueued
)
DOSTAT
(
qmerges
++
);
#ifdef
DO
STATS
#ifdef STATS
else
if
(
chunkmap
!=
0
&&
count
==
CHUNKSIZE
)
{
if
(
chunkmap
[
chunk
])
{
if
(
debug
)
...
...
@@ -379,9 +379,16 @@ ServerRecvThread(void *arg)
DOSTAT
(
msgin
++
);
if
(
!
PacketValid
(
p
,
FileInfo
.
chunks
))
{
struct
in_addr
ipaddr
=
{
p
->
hdr
.
srcip
};
DOSTAT
(
badpackets
++
);
log
(
"received bad packet %d/%d, ignored"
,
p
->
hdr
.
type
,
p
->
hdr
.
subtype
);
log
(
"received bad packet %d/%d from %s, ignored"
,
p
->
hdr
.
type
,
p
->
hdr
.
subtype
,
inet_ntoa
(
ipaddr
));
if
(
p
->
hdr
.
type
==
PKTTYPE_REQUEST
&&
p
->
hdr
.
subtype
==
PKTSUBTYPE_REQUEST
)
log
(
" len=%d, chunk=%d(%d), block=%d@%d
\n
"
,
p
->
hdr
.
datalen
,
p
->
msg
.
request
.
chunk
,
FileInfo
.
chunks
,
p
->
msg
.
request
.
count
,
p
->
msg
.
request
.
block
);
continue
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment