lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Thanks!  I've been enjoying getting acquainted with the beta.  A
tangible form of appreciation is bug reports, no?

When I use


in a script that sends a message, I get the following (wrapped) error

   ...local/zzzsge/src/lua/luasocket-2.0-beta/lua/smtp.lua:34: attempt
   to call field `try' (a nil value)

I made it work with this tweak...

sge:49$ diff -u lua/smtp.lua.ORIG lua/smtp.lua
--- lua/smtp.lua.ORIG   Fri Jun 18 17:29:26 2004
+++ lua/smtp.lua        Sun Jun 20 22:27:54 2004
@@ -106,7 +106,7 @@
     local tp = socket.try(tp.connect(server or SERVER, port or PORT, TIMEOUT))
     local s = setmetatable({tp = tp}, metat)
     -- make sure tp is closed if we get an exception
-    local try = socket.newtry(function() s:close() end)
+    s.try = socket.newtry(function() s:close() end)
     return s 

On, I think the
non-MIME example needs a comma after the first } in the definition of

Keep up the good work,

How wonderful it is that nobody need wait a single moment
before starting to improve the world.       -- Anne Frank
Paradise is exactly where you are
right now...only much, much better.    -- Laurie Anderson