aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-06-08 11:20:41 +0200
committerMicael Karlberg <[email protected]>2011-06-15 18:16:19 +0200
commit85a0e30e27167efbab0456ad4d694c84c3e9c0d4 (patch)
treeb22515c3d6e275a73023fb7326e7d7dc87c48ad3
parent6a87b618ae7702f569f73b45fa9008dede557dbf (diff)
downloadotp-85a0e30e27167efbab0456ad4d694c84c3e9c0d4.tar.gz
otp-85a0e30e27167efbab0456ad4d694c84c3e9c0d4.tar.bz2
otp-85a0e30e27167efbab0456ad4d694c84c3e9c0d4.zip
Clients started stand-alone not properly handled.
OTP-9365
-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()