http problem
Anders Nygren
anders.nygren@REDACTED
Thu Mar 3 03:08:44 CET 2005
On Tue, 1 Mar 2005 19:36:16 -0600, Anders Nygren
<anders.nygren@REDACTED> wrote:
> Hi
> I have a program that does
> URL="http://148.233.175.237:80/callejero/callejeroXMLfeed2.asp?name=ford&cp=01020&tu=3"
> Headers=[],
> Request={URL,Headers},
> Timeout=Srv_config#http_server.timeout,
> Reply=http:request(get,Request,[{timeout,Timeout}],[]) ,
>
> On linux with otp-R10B-0 Erlang (BEAM) emulator version 5.4 [source]
> [hipe] it works fine.
> But on Windows XP otp-R10B-3 Erlang 5.4.3 it crashes like shown below.
>
Some more testing and tracing has led me to the place of the error, but I still
don't know why.
prim_inet.erl:
open1(Type, Family) ->
case open0(Type) of
{ok, S} ->
case ctl_cmd(S,?INET_REQ_OPEN,[Family]) of
{ok, _} -> {ok,S};
Error -> close(S), Error
end;
Error -> Error
end.
<0.145.0>: call inet:open(-1, {0, 0, 0, 0, 0, 0, 0, 0}, 0,
[{reuseaddr,true},{active,false},{packet,0},{mode,binary}], stream,
inet6, inet6_tcp)
<0.145.0>: call prim_inet:open(stream, inet6)
<0.145.0>: call prim_inet:open1(stream, 2)
<0.145.0>: call prim_inet:open0(stream)
<0.145.0>: call erlang:open_port({spawn, tcp_inet}, [binary])
<0.145.0>: call prim_inet:ctl_cmd(#Port<0.279>, 1, [2])
<0.145.0>: call erlang:port_control(#Port<0.279>, 1, [2])<=========
Here it fails
<0.145.0>: call erlang:list_to_atom("einval")
<0.145.0>: call prim_inet:close(#Port<0.279>)
<0.145.0>: call erlang:unlink(#Port<0.279>)
or from the shell
7>Port=erlang:open_port({spawn,tcp_inet},[binary]).
#Port<0.36>
8>erlang:port_control(Port,1,[2]).
[0,101,105,110,118,97,108]
The funny thing is that I can set up a tcp connection from the windows
machine to
the linux machine. But not from the windows machine to the internet.
Any ideas anyone????
/Anders Nygren
More information about the erlang-questions
mailing list