Software /
code /
prosody
Comparison
net/dns.lua @ 5731:902927f1c96f
Merge 0.9->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Jul 2013 07:47:54 +0200 |
parent | 5705:6eebd5808fbc |
parent | 5730:411e9e7d8035 |
child | 5776:bd0ff8ae98a8 |
comparison
equal
deleted
inserted
replaced
5729:8de1f9290588 | 5731:902927f1c96f |
---|---|
627 if peer:find(":") then | 627 if peer:find(":") then |
628 sock, err = socket.udp6(); | 628 sock, err = socket.udp6(); |
629 else | 629 else |
630 sock, err = socket.udp(); | 630 sock, err = socket.udp(); |
631 end | 631 end |
632 if sock and self.socket_wrapper then sock, err = self.socket_wrapper(sock, self); end | |
632 if not sock then | 633 if not sock then |
633 return nil, err; | 634 return nil, err; |
634 end | 635 end |
635 if self.socket_wrapper then sock = self.socket_wrapper(sock, self); end | |
636 sock:settimeout(0); | 636 sock:settimeout(0); |
637 -- todo: attempt to use a random port, fallback to 0 | 637 -- todo: attempt to use a random port, fallback to 0 |
638 sock:setsockname('*', 0); | 638 sock:setsockname('*', 0); |
639 sock:setpeername(peer, 53); | 639 sock:setpeername(peer, 53); |
640 self.socket[servernum] = sock; | 640 self.socket[servernum] = sock; |