Mercurial > prosody-hg
comparison net/dns.lua @ 5776:bd0ff8ae98a8
Remove all trailing whitespace
| author | Florian Zeitz <florob@babelmonkeys.de> |
|---|---|
| date | Fri, 09 Aug 2013 17:48:21 +0200 |
| parents | 902927f1c96f |
| children | a29cc79295e6 |
comparison
equal
deleted
inserted
replaced
| 5775:a6c2b8933507 | 5776:bd0ff8ae98a8 |
|---|---|
| 751 local conn, err = self:getsocket(o.server) | 751 local conn, err = self:getsocket(o.server) |
| 752 if not conn then | 752 if not conn then |
| 753 return nil, err; | 753 return nil, err; |
| 754 end | 754 end |
| 755 conn:send (o.packet) | 755 conn:send (o.packet) |
| 756 | 756 |
| 757 if timer and self.timeout then | 757 if timer and self.timeout then |
| 758 local num_servers = #self.server; | 758 local num_servers = #self.server; |
| 759 local i = 1; | 759 local i = 1; |
| 760 timer.add_task(self.timeout, function () | 760 timer.add_task(self.timeout, function () |
| 761 if get(self.wanted, qclass, qtype, qname, co) then | 761 if get(self.wanted, qclass, qtype, qname, co) then |
| 847 end | 847 end |
| 848 | 848 |
| 849 -- retire the query | 849 -- retire the query |
| 850 local queries = self.active[response.header.id]; | 850 local queries = self.active[response.header.id]; |
| 851 queries[response.question.raw] = nil; | 851 queries[response.question.raw] = nil; |
| 852 | 852 |
| 853 if not next(queries) then self.active[response.header.id] = nil; end | 853 if not next(queries) then self.active[response.header.id] = nil; end |
| 854 if not next(self.active) then self:closeall(); end | 854 if not next(self.active) then self:closeall(); end |
| 855 | 855 |
| 856 -- was the query on the wanted list? | 856 -- was the query on the wanted list? |
| 857 local q = response.question[1]; | 857 local q = response.question[1]; |
| 862 if coroutine.status(co) == "suspended" then coroutine.resume(co); end | 862 if coroutine.status(co) == "suspended" then coroutine.resume(co); end |
| 863 end | 863 end |
| 864 set(self.wanted, q.class, q.type, q.name, nil); | 864 set(self.wanted, q.class, q.type, q.name, nil); |
| 865 end | 865 end |
| 866 end | 866 end |
| 867 | 867 |
| 868 end | 868 end |
| 869 end | 869 end |
| 870 end | 870 end |
| 871 | 871 |
| 872 return response; | 872 return response; |
