From kde-devel Mon Jul 22 22:30:26 2002 From: aleXXX Date: Mon, 22 Jul 2002 22:30:26 +0000 To: kde-devel Subject: Re: kio_smbro bug + patch X-MARC-Message: https://marc.info/?l=kde-devel&m=102737702629209 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 <<