prosody: More accurate friendly error message in the event that creating the global...
authorMatthew Wild <mwild1@gmail.com>
Sat, 13 Feb 2010 16:22:05 +0000 (16:22 +0000)
committerMatthew Wild <mwild1@gmail.com>
Sat, 13 Feb 2010 16:22:05 +0000 (16:22 +0000)
prosody

diff --git a/prosody b/prosody
index 2f60181efec995abc488c9c64ec4a5d8dbb7cca1..49580bd91deafd9b36a0eac4acaf6cb8a0319f48 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -232,8 +232,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