[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: kio_smbro bug + patch
From: aleXXX <alexander.neundorf () gmx ! net>
Date: 2002-07-22 22:30:26
[Download RAW message or body]
On Tuesday 23 July 2002 00:00, Till Gerken wrote:
> Hi,
>
> here's a patch for the smbro kio_slave. I have sent this to
> neundorf@kde.org already but I didn't get a rejection nor has it been
> included yet, so I will post it here for comments.
I can remember I had a look at the patch, but didn't know exactly whether this
is really a good thing.
Usually smb connections are quite fast.
> When reading files from the remote machine, kio_smb.cpp uses select() in
> its inner loop. If the select times out, it will end the loop. The
> problem here is that over slow links, time-outs will occur sooner or
> later and instead of waiting for new data, the file will just not be
> copied and the user will be confronted with an error code.
>
> Solution attached.
>
> Till
I committed now the following:
result=select(fifoFD+1,&readFDs,0,0,&tv);
if (wasKilled()) loopFinished=true;
else if (result==1)
{
int i=::read(fifoFD,buf,32*1024);
if (i==0) loopFinished=true;
else {
bytesRead+=i;
array.setRawData(buf, i);
data( array );
array.resetRawData(buf,i);
}
}
- else
+ else if (result<0)
loopFinished=true;
Bye
Alex
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic