1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 16:39:03 +00:00

Added missing second parameter for receive_buf which caused errors with new

Lua version.
This commit is contained in:
patrik
2012-05-27 19:20:34 +00:00
parent cc1ba1ff3d
commit 656f03676e
11 changed files with 24 additions and 24 deletions

View File

@@ -49,7 +49,7 @@ Response = {
end,
receive = function(self)
local status, data = self.socket:receive_buf("\r\n")
local status, data = self.socket:receive_buf("\r\n", false)
if ( not(status) ) then
return false, "Failed to receive data from server"
end
@@ -78,7 +78,7 @@ Response = {
local len = tonumber(data:match("^%$(%d*)"))
-- we should only have a single line, so we can just peel of the length
status, data = self.socket:receive_buf(match.numbytes(len))
status, data = self.socket:receive_buf(match.numbytes(len), false)
if( not(status) ) then
return false, "Failed to receive data from server"
end
@@ -93,12 +93,12 @@ Response = {
for i=1, count do
-- peel of the length
local status = self.socket:receive_buf("\r\n")
local status = self.socket:receive_buf("\r\n", false)
if( not(status) ) then
return false, "Failed to receive data from server"
end
status, data = self.socket:receive_buf("\r\n")
status, data = self.socket:receive_buf("\r\n", false)
if( not(status) ) then
return false, "Failed to receive data from server"
end