]> 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:51 +0000 (17:11 +0200)
src/ejabberd_config.erl
src/gen_mod.erl

index ab63cc4dfab75249d18ea921646a66e5fc4f36e9..f25c8b81ee0e39ce83b896cfbf2099ea949e9ef4 100644 (file)
@@ -263,7 +263,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 6289d9783d90229782c2af717a18a3f4cdb45ed4..a60522eb349ceb510aebb23cfa88ff9a847237d2 100644 (file)
@@ -94,7 +94,7 @@ start_module2(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.