<div dir="ltr">You're right, I overlooked this.<div><br></div><div>I just realized how unfortunate the diff format is in this case. None of these methods were changed by me, I merely merged from Squeakland and tried to figure out what to keep :)</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 30 Aug 2016 at 23:01 Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu">leves@caesar.elte.hu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 30 Aug 2016, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
<br>
> Tim Felgentreff uploaded a new version of Network to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/Network-tfel.184.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Network-tfel.184.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: Network-tfel.184<br>
> Author: tfel<br>
> Time: 30 August 2016, 11:53:57.083946 am<br>
> UUID: b90acf7c-5796-a347-8939-59955c0588dd<br>
> Ancestors: Network-tfel.183, Network-ul.183<br>
><br>
> merge a few fixes from Squeakland Etoys.<br>
> - ServerDirectories always use forward slashes, even on windows<br>
> - FTPClient connections should go through the NetNameResolver<br>
> - sockets can only accept if they are connected.<br>
><br>
> =============== Diff against Network-ul.183 ===============<br>
><br>
> Item was changed:<br>
> ----- Method: FTPClient>>openPassiveDataConnection (in category 'private protocol') -----<br>
> openPassiveDataConnection<br>
> | portInfo list dataPort remoteHostAddress |<br>
> self sendCommand: 'PASV'.<br>
> self lookForCode: 227 ifDifferent: [:response | (TelnetProtocolError protocolInstance: self) signal: 'Could not enter passive mode: ' , response].<br>
> -<br>
> portInfo := (self lastResponse findTokens: '()') at: 2.<br>
> list := portInfo findTokens: ','.<br>
> + remoteHostAddress := NetNameResolver addressForName: (list at: 1)<br>
> + , '.'<br>
> + , (list at: 2) , '.'<br>
> + , (list at: 3) , '.'<br>
> + , (list at: 4) timeout: 30.<br>
> - remoteHostAddress := ByteArray<br>
> - with: (list at: 1) asNumber<br>
> - with: (list at: 2) asNumber<br>
> - with: (list at: 3) asNumber<br>
> - with: (list at: 4) asNumber.<br>
> dataPort := (list at: 5) asNumber * 256 + (list at: 6) asNumber.<br>
> + self openDataSocket: remoteHostAddress port: dataPort!<br>
> - self openDataSocket: remoteHostAddress port: dataPort<br>
> - !<br>
><br>
> Item was changed:<br>
> ----- Method: ServerDirectory>>isRoot (in category 'testing') -----<br>
> isRoot<br>
> + ^ directory = '/'!<br>
> - ^directory = (String with: self pathNameDelimiter)!<br>
><br>
> Item was changed:<br>
> ----- Method: Socket>>waitForAcceptFor:ifTimedOut: (in category 'waiting') -----<br>
> waitForAcceptFor: timeout ifTimedOut: timeoutBlock<br>
> "Wait and accept an incoming connection"<br>
> self waitForConnectionFor: timeout ifTimedOut: [^timeoutBlock value].<br>
> + ^self isConnected<br>
<br>
Does this change actually do anything? Won't the previous line return when<br>
the socket is not connected?<br>
<br>
Levente<br>
<br>
> + ifTrue:[self accept]<br>
> + !<br>
> - ^self accept!<br>
><br>
><br>
><br>
<br>
</blockquote></div>