4.9.1 questions/problems

Magnus Fröberg <>
Fri Nov 26 08:34:30 CET 1999


"Costel Vrinceanu [4692]" wrote:
> 
> If starting two nodes on the same host, , :
> 
> net_adm:world_list([somehost]).
> 
>   returns => []
> 
> 'epmd -names' reports correctly:
>   epmd: up and running on port 4369 with data:
>   name n1 at port 40575
>   name n2 at port 40571
> 
> I tried to step through net_adm , erl_epmd , inet_tcp but the debugger will
> feed the macro definition of ?erlang_daemon_port (=4369) as the atom '4369'
> instead of the integer 4369, so inet_tcp:connect/3 will fail with badarg
> 
> Is there another way to get to the bottom of this (other than sprinkling the
> code with printfs/error_logger)?
> 
> (Trying the same thing on the 4.7.1 release on the same machine works correctly)
> 

Hi,

it was a problem with usage of new syntax I guess ;-) 
Wow, I like it, realy missed this syntax before.

change erl_epmd:parse_line/1 to:

	parse_line("name " ++ Buf0) ->
	    case parse_name(Buf0, []) of
		{Name, Buf1}  ->
		    case Buf1 of
			"at port " ++ Buf2 ->
			    case catch list_to_integer(Buf2) of
				{'EXIT', _} -> error;
				Port -> {ok, {Name, Port}}
			    end;
			_ -> error
		    end;
		error -> error
	    end;
	parse_line(_) -> error.

I changed:

	"name " ++ Buf0     was ["name " ++ Buf0]
	"at port " ++ Buf2  was ["at port " ++ Buf2]

/Magnus

-- 
Magnus Fröberg                          Tel: +46 (0)8 692 22 06
Bluetail AB                             Email: 
Hantverkargatan 78                      WWW: http://www.bluetail.com
SE-112 38 Stockholm, SWEDEN



More information about the erlang-questions mailing list