Skip to content

Commit

Permalink
XMPP domain must be converted to string (TSUN-289)
Browse files Browse the repository at this point in the history
  • Loading branch information
nniclausse committed Apr 29, 2014
1 parent 91e5aa3 commit 0d00495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/tsung/ts_jabber.erl
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ add_dynparams2(true, DynVars, Param, _Host) ->
%% than use side effects, as get_message/1 andn add_dynparams/4 aren't allowed
%% to return a new DynData, and so they can't modify the session state.
choose_domain(VHostFileId) ->
{ok,Domain} = ts_file_server:get_random_line(VHostFileId),
{ok,DomainBin} = ts_file_server:get_random_line(VHostFileId),
Domain=binary_to_list(DomainBin),
UserServer = global:whereis_name(list_to_atom("us_"++Domain)),
{Domain,UserServer}.

Expand Down
2 changes: 1 addition & 1 deletion src/tsung_controller/ts_config_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ setup_user_servers(FileId,Val) when is_atom(FileId), is_integer(Val) ->
{ok,Domains} = ts_file_server:get_all_lines(FileId),
?LOGF("Domains:~p~n",[Domains],?DEB),
lists:foreach(fun(Domain) ->
{ok,_} = ts_user_server_sup:start_user_server(list_to_atom("us_" ++Domain))
{ok,_} = ts_user_server_sup:start_user_server(list_to_atom("us_" ++binary_to_list(Domain)))
end, Domains),
ts_user_server:reset_all(Val).

Expand Down

0 comments on commit 0d00495

Please sign in to comment.