diff options
author | Kim Alvefur <zash@zash.se> | 2016-07-14 13:41:02 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-07-14 13:41:02 +0200 |
commit | ccadcc9b4710fcf04c51d01cb40611efd5f7b835 (patch) | |
tree | 7f1c0c36f5c9dadc79cbec11d668ba0bdef0d36f /net | |
parent | 3616de36510d613e3eb2e75e730f5066bfa41741 (diff) | |
parent | 81dba787f4875f51e6d376231373600401c99411 (diff) | |
download | prosody-ccadcc9b4710fcf04c51d01cb40611efd5f7b835.tar.gz prosody-ccadcc9b4710fcf04c51d01cb40611efd5f7b835.zip |
Merge 0.10->trunk
Diffstat (limited to 'net')
-rw-r--r-- | net/dns.lua | 8 | ||||
-rw-r--r-- | net/server_select.lua | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/dns.lua b/net/dns.lua index 726b2b80..7bdb9e57 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -386,7 +386,7 @@ end function resolver:AAAA(rr) local addr = {}; - for i = 1, rr.rdlength, 2 do + for _ = 1, rr.rdlength, 2 do local b1, b2 = self:byte(2); table.insert(addr, ("%02x%02x"):format(b1, b2)); end @@ -523,7 +523,7 @@ end function resolver:rrs (count) -- - - - - - - - - - - - - - - - - - - - - rrs local rrs = {}; - for i = 1,count do append(rrs, self:rr()); end + for _ = 1, count do append(rrs, self:rr()); end return rrs; end @@ -536,7 +536,7 @@ function resolver:decode(packet, force) -- - - - - - - - - - - - - - decode response.question = {}; local offset = self.offset; - for i = 1,response.header.qdcount do + for _ = 1, response.header.qdcount do append(response.question, self:question()); end response.question.raw = string.sub(self.packet, offset, self.offset - 1); @@ -1026,7 +1026,7 @@ function resolver.print(response) -- - - - - - - - - - - - - resolver.print local tmp; for _, s in pairs({'answer', 'authority', 'additional'}) do for i,rr in pairs(response[s]) do - for j,t in pairs({ 'name', 'type', 'class', 'ttl', 'rdlength' }) do + for _, t in pairs({ 'name', 'type', 'class', 'ttl', 'rdlength' }) do tmp = string.format('%s[%i].%s', s, i, t); print(string.format('%-30s', tmp), rr[t], hint(rr, t)); end diff --git a/net/server_select.lua b/net/server_select.lua index f70f81d0..0776b02e 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -562,7 +562,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport local read, wrote handshake = coroutine_wrap( function( client ) -- create handshake coroutine local err - for i = 1, _maxsslhandshake do + for _ = 1, _maxsslhandshake do _sendlistlen = ( wrote and removesocket( _sendlist, client, _sendlistlen ) ) or _sendlistlen _readlistlen = ( read and removesocket( _readlist, client, _readlistlen ) ) or _readlistlen read, wrote = nil, nil |