aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/inets/src/http_client/httpc.erl7
-rw-r--r--lib/inets/test/httpc_SUITE.erl3
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index d957e97122..54f254db52 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -64,6 +64,8 @@ default_profile() ->
profile_name(?DEFAULT_PROFILE) ->
httpc_manager;
+profile_name(Profile) when is_pid(Profile) ->
+ Profile;
profile_name(Profile) ->
Prefix = lists:flatten(io_lib:format("~w_", [?MODULE])),
profile_name(Prefix, Profile).
@@ -72,11 +74,6 @@ profile_name(Prefix, Profile) when is_atom(Profile) ->
list_to_atom(Prefix ++ atom_to_list(Profile));
profile_name(_Prefix, Profile) when is_pid(Profile) ->
Profile.
- %% ProfileStr0 =
- %% string:strip(string:strip(erlang:pid_to_list(Profile), left, $<), right, $>),
- %% F = fun($.) -> $_; (X) -> X end,
- %% ProfileStr = [F(C) || C <- ProfileStr0],
- %% list_to_atom(Prefix ++ "pid_" ++ ProfileStr).
%%--------------------------------------------------------------------------
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 731e330ef7..202dcca763 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -341,6 +341,7 @@ init_per_testcase(Case, Timeout, Config) ->
"~n SSL start result: ~p",
[CryptoStartRes, PubKeyStartRes, SSLStartRes]),
Profile = ipv6,
+ %% A stand-alone profile is represented by a pid()
{ok, ProfilePid} =
inets:start(httpc,
[{profile, Profile},
@@ -367,7 +368,7 @@ init_per_testcase(Case, Timeout, Config) ->
%% snmp:set_trace([gen_tcp]),
NewConfig.
-
+
%%--------------------------------------------------------------------
%% Function: end_per_testcase(Case, Config) -> _
%% Case - atom()