improve formating
This commit is contained in:
parent
701908d016
commit
7a7b6feb60
|
|
@ -384,20 +384,21 @@ void serve_file (struct sockaddr_in * from, UBUF * ub, FILE * fp,
|
|||
unsigned len;
|
||||
unsigned long pos;
|
||||
|
||||
if(has_len == 2) { /* recover length field if it exists */
|
||||
len=lp[0] << 8;
|
||||
len = len + lp[1];
|
||||
if(len > packetsize )
|
||||
len = packetsize;
|
||||
else
|
||||
if(len <= 0)
|
||||
len = UBUF_SPACE;
|
||||
} else
|
||||
if(has_len == 2) { /* recover length field if it exists */
|
||||
len = lp[0] << 8;
|
||||
len = len + lp[1];
|
||||
if(len > packetsize ) {
|
||||
len = packetsize;
|
||||
} else if(len <= 0) {
|
||||
len = UBUF_SPACE;
|
||||
}
|
||||
} else
|
||||
{
|
||||
/* use default if it doesn't exist */
|
||||
/* use default length because length is not included in request */
|
||||
len = packetsize;
|
||||
if( len > UBUF_SPACE )
|
||||
len = UBUF_SPACE;
|
||||
if( len > UBUF_SPACE ) {
|
||||
len = UBUF_SPACE;
|
||||
}
|
||||
}
|
||||
|
||||
pos = BB_READ4(ub->bb_pos);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user