mod_bosh: Fix logging when no sid present, fix a missing semi-colon, avoid an extra useless table lookup (thanks Thomas)
authorMatthew Wild <mwild1@gmail.com>
Tue, 28 Jun 2011 17:00:50 +0100
changeset 4327 98ae0d0b4d07
parent 4326 6c082bf9bf0f
child 4328 c71777a8b9c7
mod_bosh: Fix logging when no sid present, fix a missing semi-colon, avoid an extra useless table lookup (thanks Thomas)
plugins/mod_bosh.lua
--- a/plugins/mod_bosh.lua	Mon Jun 27 20:36:18 2011 +0100
+++ b/plugins/mod_bosh.lua	Tue Jun 28 17:00:50 2011 +0100
@@ -217,8 +217,8 @@
 end
 
 function stream_callbacks.streamopened(request, attr)
-	log("debug", "BOSH body open (sid: %s)", attr.sid);
-	local sid = attr.sid
+	local sid = attr.sid;
+	log("debug", "BOSH body open (sid: %s)", sid or "<none>");
 	if not sid then
 		-- New session request
 		request.notopen = nil; -- Signals that we accept this opening tag