From 27114996e41d03b74913ccf02240ae572e09ad82 Mon Sep 17 00:00:00 2001
From: Matthew Wild <mwild1@gmail.com>
Date: Sat, 13 Feb 2010 16:22:05 +0000
Subject: prosody: More accurate friendly error message in the event that
 creating the global SSL context fails

---
 prosody | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'prosody')

diff --git a/prosody b/prosody
index 65d8dceb..55198c2f 100755
--- a/prosody
+++ b/prosody
@@ -221,8 +221,12 @@ function init_global_state()
 						elseif err:match("permission") then
 							friendly_message = "Prosody does not have sufficient privileges to use this port";
 						elseif err == "no ssl context" then
-							friendly_message = "there is no 'ssl' config under Host \"*\" which is "
-								.."require for legacy SSL ports";
+							if not config.get("*", "core", "ssl") then
+								friendly_message = "there is no 'ssl' config under Host \"*\" which is "
+									.."require for legacy SSL ports";
+							else
+								friendly_message = "initializing SSL support failed, see previous log entries";
+							end
 						end
 						log("error", "Failed to open server port %d, %s", port, friendly_message);
 					end
-- 
cgit v1.2.3