diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-16 01:02:07 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-16 01:02:07 +0000 |
| commit | d46f7a09a768b146f2f3cdc9a6a50357832bd1c7 (patch) | |
| tree | d4f7ca1e677d06446245691d5ece6dab51915f16 /src/tp.lua | |
| parent | 843a431ef98fd541d98fd3898463985d9bfcde28 (diff) | |
| download | luasocket-d46f7a09a768b146f2f3cdc9a6a50357832bd1c7.tar.gz luasocket-d46f7a09a768b146f2f3cdc9a6a50357832bd1c7.tar.bz2 luasocket-d46f7a09a768b146f2f3cdc9a6a50357832bd1c7.zip | |
Fixed smtp.lua loading.
Adjusted tftp module.
Added some comments.
Diffstat (limited to 'src/tp.lua')
| -rw-r--r-- | src/tp.lua | 4 |
1 files changed, 0 insertions, 4 deletions
| @@ -49,7 +49,6 @@ local metat = { __index = {} } | |||
| 49 | 49 | ||
| 50 | function metat.__index:check(ok) | 50 | function metat.__index:check(ok) |
| 51 | local code, reply = get_reply(self.control) | 51 | local code, reply = get_reply(self.control) |
| 52 | print(reply) | ||
| 53 | if not code then return nil, reply end | 52 | if not code then return nil, reply end |
| 54 | if type(ok) ~= "function" then | 53 | if type(ok) ~= "function" then |
| 55 | if type(ok) == "table" then | 54 | if type(ok) == "table" then |
| @@ -65,7 +64,6 @@ print(reply) | |||
| 65 | end | 64 | end |
| 66 | 65 | ||
| 67 | function metat.__index:command(cmd, arg) | 66 | function metat.__index:command(cmd, arg) |
| 68 | print(cmd, arg) | ||
| 69 | if arg then return self.control:send(cmd .. " " .. arg.. "\r\n") | 67 | if arg then return self.control:send(cmd .. " " .. arg.. "\r\n") |
| 70 | else return self.control:send(cmd .. "\r\n") end | 68 | else return self.control:send(cmd .. "\r\n") end |
| 71 | end | 69 | end |
| @@ -113,5 +111,3 @@ connect = socket.protect(function(host, port, timeout) | |||
| 113 | socket.try(control:connect(host, port)) | 111 | socket.try(control:connect(host, port)) |
| 114 | return setmetatable({control = control}, metat) | 112 | return setmetatable({control = control}, metat) |
| 115 | end) | 113 | end) |
| 116 | |||
| 117 | return tp | ||
