Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  Strange behaviour of inet_res:getbyname

alexey at sevcom.net
Posted: Wed Nov 10, 2004 2:39 pm Reply with quote
Guest
Hi!

There is strange behaviour of inet_res:getbyname/2 when it called from node
with long name, short name, and without name.

Without node name it immediately returns {error,timeout}:

$ erl
Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]

Eshell V5.4 (abort with ^G)
1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv).
{error,timeout}

The same with sort node name:

$ erl -sname test
Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]

Eshell V5.4 (abort with ^G)
(test_at_yo)1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv).
{error,timeout}

And it works as expected with long node name:

$ erl -name test
Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]

Eshell V5.4 (abort with ^G)
(test_at_yo.jabber.ru)1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv).
{ok,{hostent,"_xmpp-server._tcp.jabber.ru",[],srv,1,[{0,0,5269,"jabber.ru"}]}}

It seems this problem appeared in R10B.


Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum