Discussion:
[bug #14075] client.connect to a local server fails, if DNS is unavailable
anonymous
2009-08-06 01:16:16 UTC
Permalink
URL:
<http://gna.org/bugs/?14075>

Summary: client.connect to a local server fails, if DNS is
unavailable
Project: XMPP4R
Submitted by: None
Submitted on: Thursday 08/06/2009 at 03:16 CEST
Category: None
Severity: 2 - Minor
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email: stewartjm-***@public.gmane.org
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

When connecting to a XMPP server on the local machine, the lack of a DNS
server causes a crash when client.connect is called with no arguements.

the stack trace looks like:
C:/Ruby/lib/ruby/1.8/resolv.rb:709:in `send': A request to send or receive
data was disallowed because the socket is not connected and (when sending on
a datagram socket using a sendto call) no address was supplied. - send(2)
(Errno::ENOTCONN)
from C:/Ruby/lib/ruby/1.8/resolv.rb:709:in `send'
from C:/Ruby/lib/ruby/1.8/resolv.rb:596:in `request'
... snipped a few lines
from C:/Ruby/lib/ruby/1.8/resolv.rb:457:in `getresources'
from
C:/Ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:51:in
`connect'
from C:/Ruby/lib/ruby/1.8/resolv.rb:380:in `open'
from
C:/Ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:47:in
`connect'
from test_connect.rb:11

It's easy enough to work around by supplying an argument to connect.

But, I think it's worth fixing, since removing the DNS server from the
equation, shouldn't cause a system that doesn't require one to break.

I've attached a possible patch to client.rb to this post.





_______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thursday 08/06/2009 at 03:16 CEST Name: client.patch Size: 1kB By:
None

<http://gna.org/bugs/download.php?file_id=6354>

_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?14075>

_______________________________________________
Message sent via/by Gna!
http://gna.org/

Loading...