1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Tiny simplification

This commit is contained in:
Volker Lendecke 2008-01-25 09:28:19 +01:00
parent f591bd68ea
commit e78f6872bf

View File

@ -1150,16 +1150,15 @@ ssize_t read_smb_length_return_keepalive(int fd,
ssize_t read_smb_length(int fd, char *inbuf, unsigned int timeout, enum smb_read_errors *pre)
{
ssize_t len;
uint8_t msgtype = SMBkeepalive;
for(;;) {
len = read_smb_length_return_keepalive(fd, inbuf, timeout, pre);
if(len < 0)
while (msgtype == SMBkeepalive) {
len = read_smb_length_return_keepalive(fd, inbuf, timeout,
pre);
if (len < 0) {
return len;
/* Ignore session keepalives. */
if(CVAL(inbuf,0) != SMBkeepalive)
break;
}
msgtype = CVAL(inbuf, 0);
}
DEBUG(10,("read_smb_length: got smb length of %lu\n",