r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Core] Discuss core issues

Bo
22-Jan-2007
[6889]
But it doesn't seem to hang up while appending to an existing file. 
 The only time I have seen it hang up is when Filezilla returns a 
425 message.
Volker
22-Jan-2007
[6890]
where was the download  for thesdk? Is  that  public?
Bo
22-Jan-2007
[6891]
What part of the SDK do you want?  The ftp-prot.r file?  I can place 
that on the FTP server under the rebol3 account.
Volker
22-Jan-2007
[6892x2]
yes, to make sure i use the same.
maybe the 425  is not handled correctly.
Bo
22-Jan-2007
[6894x3]
OK.  It's on the FTP server now as prot-ftp.r
In the root level.
A simple search doesn't find 425 anywhere in that protocol.
Oldes
22-Jan-2007
[6897]
you may try my ftp-sync script ftp://rebol3:[rebol3-:-69-:-12-:-157-:-73]/test/ftp-sync-latest.zip 
I never used it in the real life, so maybe it's not perfect as well.
Bo
22-Jan-2007
[6898]
Do I replace the regular prot-ftp.r with this?
Oldes
22-Jan-2007
[6899x4]
no... and I see, the zip is not complete, I uploaded complete script 
to:  ftp://rebol3:[rebol3-:-69-:-12-:-157-:-73]/test/ftp-sync_latest.r
And it certainly require some fixes
as it douesn't recognize, that the file is already uploaded and with 
same or newer date
there is just a little mess with the source and target path, as I 
was using it in the scenarie, where the target path was accessed 
thru http, it should not be difficult to fix it, but I don't have 
more time now
Volker
22-Jan-2007
[6903x2]
http://support.microsoft.com/kb/129395/could match?
with wireless port is more often in wait-state?
the last message can be located by looking for list-check, then some 
port-opening seems to happen.
Bo
22-Jan-2007
[6905]
Volker, this definitely seems like it could be the issue.
Volker
22-Jan-2007
[6906]
can you add some wait between  files in your code, to give it  time 
 to relax? just guessing.
Bo
22-Jan-2007
[6907x2]
Smooth-Copy has an adjustable wait mechanism built in, but it may 
make the overall length of the transfer too long.  I'll have to put 
some debugging statements in prot-ftp.r to see if I can isolate the 
problem and figure out how to go around it.
Thanks for the help you have given so far!
Volker
22-Jan-2007
[6909x2]
np
Pleae tell when you  find out where it hangs. Curious :)
Bo
22-Jan-2007
[6911x2]
If I find a solution, I'll post the fix and let you know.
Yup, just verified that Rebol always hangs up when the FTP server 
logs a 425 response: "425 Can't open data connection"
Bo
23-Jan-2007
[6913x2]
I've found THE LINE that Rebol hangs up on when the FTP server returns 
a 425 response.  It is the line with the ;<--- after it below:

	accept-connect: func [port type][
		if not port/locals/passive [
			either port/locals/listen-port [
				if type <> 'new-dir [
					port/sub-port: first port/locals/listen-port ;<---
				]
				close-listen port
				port/locals/listen-port: none
			][
				net-utils/accept-proxy port/sub-port
			]
		]
	]
Obviously, it is in an infinite wait for a listen port that will 
never come.  Can you see any problems if the line were changed to:


if port? lstn-prt: wait [any [system/schemes/ftp/timeout system/schemes/default/timeout 
30] port/locals/listen-port][port/sub-port: lstn-prt]
Volker
23-Jan-2007
[6915]
there should  be a timeout, yes. Would  trigger an error too, how 
 is that done in the right way with ports? Because i do not know 
what this code  does without a port/subport.

what confuses  me, this code runs also in passive  mode?


an idea of mine is to listen on both ports, control and this one. 
if the server sends the 405, its never processed because we dont 
listen there. Should  listen on both ports and still handle commands. 
But do not know what the  right vars are.  Waiting for the skilled 
 ftp-patchers  before examining^^
Bo
23-Jan-2007
[6916]
In limited testing, my patch above (slightly modified to remove typos) 
works.  If the 425 occurs, after a timeout period the patched protocol 
picks up right where it left off.  But yes, I would really like the 
skilled ftp-patchers to take a look at the problem and see if they 
can come up with a better fix.
Volker
23-Jan-2007
[6917]
Grats :)
sqlab
24-Jan-2007
[6918]
Are you sure that this happens in passive mode, despite  " if not 
port/locals/passive [  "


I found this line also to be the cause for infinite waiting when 
using ftp with active mode thru a firewall . But activating the passive 
mode eliminated the need for a patch on  my side.
Graham
24-Jan-2007
[6919x2]
Anyone got a quick script I can use to determine the ip address of 
a PC on the local network?
I presume I need one server script and one client script
Rebolek
24-Jan-2007
[6921]
Graham: do you mean IP adress of your computer?
>> read dns://
== "boleslavb967"
>> read dns://boleslavb967
== 10.10.8.179
Graham
24-Jan-2007
[6922x3]
no
I just get 127.0.0.1 when i do that.
it's a virtual nic ...
Rebolek
24-Jan-2007
[6925]
then I'm afraid I don't know :/
Graham
24-Jan-2007
[6926x3]
maybe there's some linux command that will tell me
like windows ipconfig
ifconfig :)
Volker
24-Jan-2007
[6929x2]
there was a script which lists all  the available interfaces. bBsed 
 on 'get-modes IIRC. But  forgot  where i saw it.
IIRC Robert and the author where chatting  once, maybe  he remembers?
Bo
24-Jan-2007
[6931]
sqlab: I'm double-checking my code...
Anton
26-Jan-2007
[6932]
get-modes tcp:// 'interfaces
Graham
26-Jan-2007
[6933]
works nicely
Robert
26-Jan-2007
[6934]
Is it possible to get the MAC address as well?
Anton
26-Jan-2007
[6935]
I don't think I've ever seen it directly in rebol.
Henrik
26-Jan-2007
[6936]
I think that would be a security hole.
Pekr
26-Jan-2007
[6937x2]
why?
just run ipconfig /all via shell and parse it out ;-)