# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1239186123 -3600
# Node ID 872f5d85636ef4025fea7083d5d66b6498e9b68b
# Parent  b48ed2149d0abc8a6d85de12c65389d5e5b63a3b
net.server: Ensure some logging parameters are strings

diff -r b48ed2149d0a -r 872f5d85636e net/server.lua
--- a/net/server.lua	Wed Apr 08 11:21:21 2009 +0100
+++ b/net/server.lua	Wed Apr 08 11:22:03 2009 +0100
@@ -244,10 +244,10 @@
                 return false
             end
             connections = connections + 1
-            out_put( "server.lua: accepted new client connection from ", ip, ":", clientport, " to ",  serverport)
+            out_put( "server.lua: accepted new client connection from ", tostring(ip), ":", tostring(clientport), " to ", tostring(serverport))
             return dispatch( handler )
         elseif err then    -- maybe timeout or something else
-            out_put( "server.lua: error with new client connection: ", err )
+            out_put( "server.lua: error with new client connection: ", tostring(err) )
             return false
         end
     end
@@ -443,7 +443,7 @@
             --out_put( "server.lua: read data '", buffer, "', error: ", err )
             return dispatch( handler, buffer, err )
         else    -- connections was closed or fatal error
-            out_put( "server.lua: client ", ip, ":", tostring(clientport), " error: ", tostring(err) )
+            out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " error: ", tostring(err) )
             fatalerror = true
             disconnect( handler, err )
 	    _ = handler and handler.close( )
@@ -474,7 +474,7 @@
             _writetimes[ handler ] = _currenttime
             return true
         else    -- connection was closed during sending or fatal error
-            out_put( "server.lua: client ", ip, ":", clientport, " error: ", err )
+            out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " error: ", tostring(err) )
             fatalerror = true
             disconnect( handler, err )
             _ = handler and handler.close( )
@@ -500,7 +500,7 @@
                         -- return dispatch( handler )
                         return true
                     else
-                        out_put( "server.lua: error during ssl handshake: ", err )
+                        out_put( "server.lua: error during ssl handshake: ", tostring(err) )
                         if err == "wantwrite" and not wrote then
                             _sendlistlen = _sendlistlen + 1
                             _sendlist[ _sendlistlen ] = client
@@ -526,7 +526,7 @@
 	    local err
             socket, err = ssl_wrap( socket, sslctx )    -- wrap socket
             if err then
-                out_put( "server.lua: ssl error: ", err )
+                out_put( "server.lua: ssl error: ", tostring(err) )
                 mem_free( )
                 return nil, nil, err    -- fatal error
             end
@@ -546,7 +546,7 @@
                 socket, err = ssl_wrap( socket, sslctx )    -- wrap socket
                 --out_put( "server.lua: sslwrapped socket is " .. tostring( socket ) )
                 if err then
-                    out_put( "server.lua: error while starting tls on client: ", err )
+                    out_put( "server.lua: error while starting tls on client: ", tostring(err) )
                     return nil, err    -- fatal error
                 end