Fix error when nick registration stanza doesn't contain Value.

SVN Revision: 2394
This commit is contained in:
Badlop 2009-07-27 09:36:49 +00:00
parent 9d9fca5e19
commit 1262b0e353
1 changed files with 4 additions and 4 deletions

View File

@ -742,11 +742,11 @@ process_iq_register_set(Host, From, SubEl, Lang) ->
{error, ?ERR_BAD_REQUEST};
_ ->
case lists:keysearch("nick", 1, XData) of
false ->
{value, {_, [Nick]}} when Nick /= "" ->
iq_set_register_info(Host, From, Nick, Lang);
_ ->
ErrText = "You must fill in field \"Nickname\" in the form",
{error, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)};
{value, {_, [Nick]}} ->
iq_set_register_info(Host, From, Nick, Lang)
{error, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)}
end
end;
_ ->