]> granicus.if.org Git - ejabberd/commitdiff
Cut the string when calling halt/1
authorBadlop <badlop@process-one.net>
Mon, 30 May 2011 15:11:32 +0000 (17:11 +0200)
committerBadlop <badlop@process-one.net>
Mon, 30 May 2011 15:11:32 +0000 (17:11 +0200)
src/ejabberd_config.erl
src/gen_mod.erl

index 1609b447d3da6cc39063fce316398be4010b4ff9..5f756be650c52c681e4d0399acbd43b187384e0a 100644 (file)
@@ -215,7 +215,7 @@ exit_or_halt(ExitText) ->
     case [Vsn || {ejabberd, _Desc, Vsn} <- application:which_applications()] of
        [] ->
            timer:sleep(1000),
-           halt(ExitText);
+           halt(string:substr(ExitText, 1, 199));
        [_] ->
            exit(ExitText)
     end.
index 397cbc35a424629152f0f5547cdfa705de08b720..0f577d31ad0e7691dd8dc5262c6b3f0f2ad247fd 100644 (file)
@@ -79,7 +79,7 @@ start_module(Host, Module, Opts) ->
                false ->
                    ?CRITICAL_MSG("ejabberd initialization was aborted because a module start failed.", []),
                    timer:sleep(3000),
-                   erlang:halt(lists:flatten(ErrorText))
+                   erlang:halt(string:substr(lists:flatten(ErrorText), 1, 199))
            end
     end.