25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-04 16:40:36 +01:00

* src/ejabberd_captcha.erl: If a problem appears while obtaining

the image, show error message (EJAB-895)

SVN Revision: 2030
This commit is contained in:
Badlop 2009-04-22 10:26:19 +00:00
parent a26a7463a0
commit 8654991333
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2009-04-22 Badlop <badlop@process-one.net>
* src/ejabberd_captcha.erl: If a problem appears while obtaining
the image, show error message (EJAB-895)
* src/Makefile.in: Install example script captcha.sh (EJAB-895)
* src/ejabberd.cfg.example: Add CAPTCHA options (EJAB-895)

View File

@ -283,6 +283,11 @@ create_image(Key) ->
{ok, "image/jpeg", Key, Img};
{ok, <<$G, $I, $F, $8, X, $a, _/binary>> = Img} when X==$7; X==$9 ->
{ok, "image/gif", Key, Img};
{error, enodata = Reason} ->
?ERROR_MSG("Failed to process output from \"~s\". "
"Maybe ImageMagick's Convert program is not installed.",
[Cmd]),
{error, Reason};
{error, Reason} ->
?ERROR_MSG("Failed to process an output from \"~s\": ~p",
[Cmd, Reason]),