Permalink
Browse files

don't resolve hostname if scan_intf is not set (can be the wrong inte…

…rface)
  • Loading branch information...
1 parent 033c8fd commit 7fe9f160ea8e1b44b8b2107a4f4a0e2c37775415 @nniclausse nniclausse committed Mar 15, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/tsung_controller/ts_config.erl
@@ -218,18 +218,17 @@ parse(Element = #xmlElement{name=client, attributes=Attrs},
Fun = fun(N)->
IP = case Scan_Intf of
"" ->
- {ok, TmpIP } = inet:getaddr(N,inet),
- TmpIP;
+ [];
Interface ->
case os:type() of
{unix, linux} ->
- {scan, Interface};
+ [{scan, Interface}];
OS ->
io:format(standard_error,"Scan interface is not supported on OS ~p, abort~n",[OS]),
exit({error, scan_interface_not_supported_on_os})
end
end,
- #client{host=N,weight=Weight,ip=[IP],maxusers=MaxUsers}
+ #client{host=N,weight=Weight,ip=IP,maxusers=MaxUsers}
end,
lists:map(Fun, Nodes);
_ ->

0 comments on commit 7fe9f16

Please sign in to comment.