aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_service.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-04-27 23:58:27 +0200
committerAnders Svensson <[email protected]>2017-06-13 13:50:06 +0200
commitf489c0d5f2b5fbb2e40bfacd9981d5515d375e98 (patch)
treefd2b8941fdbac101f809a71f8da9556fd9e86f3b /lib/diameter/src/base/diameter_service.erl
parentd56888b318baf62cdaf9d6e9f875f9656e420e4f (diff)
downloadotp-f489c0d5f2b5fbb2e40bfacd9981d5515d375e98.tar.gz
otp-f489c0d5f2b5fbb2e40bfacd9981d5515d375e98.tar.bz2
otp-f489c0d5f2b5fbb2e40bfacd9981d5515d375e98.zip
Don't deconstruct {TPid, Caps} unnecessarily
The tuple is returned from and passed to callbacks, so retain the tuple instead of its elements.
Diffstat (limited to 'lib/diameter/src/base/diameter_service.erl')
-rw-r--r--lib/diameter/src/base/diameter_service.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 78bc5afdf1..be50e87179 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -274,7 +274,7 @@ whois(SvcName) ->
%% ---------------------------------------------------------------------------
-spec pick_peer(SvcName, AppOrAlias, Opts)
- -> {{TPid, Caps, App}, SvcOpts}
+ -> {{{TPid, Caps}, App}, SvcOpts}
| false %% no selection
| {error, no_service}
when SvcName :: diameter:service_name(),
@@ -314,8 +314,8 @@ pick(#state{options = SvcOpts}
App = App0#diameter_app{module = ModX ++ Xtra},
[_,_] = RealmAndHost = diameter_lib:eval([DestF, Dict]),
case pick_peer(App, RealmAndHost, Filter, S) of
- {TPid, Caps} ->
- {{TPid, Caps, App}, SvcOpts};
+ {_TPid, _Caps} = TC ->
+ {{TC, App}, SvcOpts};
false = No ->
No
end.