aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diameter/src')
-rw-r--r--lib/diameter/src/app/.gitignore1
-rw-r--r--lib/diameter/src/app/Makefile2
-rw-r--r--lib/diameter/src/app/diameter.erl24
-rw-r--r--lib/diameter/src/app/diameter_service.erl16
-rw-r--r--lib/diameter/src/compiler/Makefile2
-rw-r--r--lib/diameter/src/transport/Makefile2
6 files changed, 10 insertions, 37 deletions
diff --git a/lib/diameter/src/app/.gitignore b/lib/diameter/src/app/.gitignore
index 1310a0da6b..d388e61877 100644
--- a/lib/diameter/src/app/.gitignore
+++ b/lib/diameter/src/app/.gitignore
@@ -2,4 +2,5 @@
/diameter_gen_*.erl
/diameter_gen_*.hrl
/depend.mk
+/diameter.mk
diff --git a/lib/diameter/src/app/Makefile b/lib/diameter/src/app/Makefile
index 8985ca4911..6de220d282 100644
--- a/lib/diameter/src/app/Makefile
+++ b/lib/diameter/src/app/Makefile
@@ -187,7 +187,7 @@ depend: depend.mk
# has already been made since it's currently not smart enough to not
# force a rebuild of those beams dependent on generated hrls, and this
# is a no-no at make release.
-depend.mk: depend.sed $(MODULES:%=%.erl) modules.mk Makefile
+depend.mk: depend.sed $(MODULES:%=%.erl) Makefile
(for f in $(MODULES); do \
sed -f $< $$f.erl | sed "s@/@/$$f@"; \
done) \
diff --git a/lib/diameter/src/app/diameter.erl b/lib/diameter/src/app/diameter.erl
index 5f2ab82475..2f721421d8 100644
--- a/lib/diameter/src/app/diameter.erl
+++ b/lib/diameter/src/app/diameter.erl
@@ -35,7 +35,6 @@
%% Information.
-export([services/0,
- service_info/1,
service_info/2]).
%% Start/stop the application. In a "real" application this should
@@ -44,12 +43,6 @@
-export([start/0,
stop/0]).
-%% Backwards compatibility.
--export([add_connector/2,
- add_listener/2,
- remove_connector/2,
- remove_listener/2]).
-
-include("diameter_internal.hrl").
-include("diameter_types.hrl").
@@ -109,7 +102,7 @@ services() ->
[Name || {Name, _} <- diameter_service:services()].
%%% --------------------------------------------------------------------------
-%%% service_info/[12]
+%%% service_info/2
%%% --------------------------------------------------------------------------
-spec service_info(service_name(), atom() | [atom()])
@@ -118,9 +111,6 @@ services() ->
service_info(SvcName, Option) ->
diameter_service:info(SvcName, Option).
-service_info(SvcName) ->
- service_info(SvcName, all).
-
%%% --------------------------------------------------------------------------
%%% add_transport/3
%%% --------------------------------------------------------------------------
@@ -133,12 +123,6 @@ add_transport(SvcName, {T, Opts} = Cfg)
when is_list(Opts), (T == connect orelse T == listen) ->
diameter_config:add_transport(SvcName, Cfg).
-add_listener(SvcName, Opts) ->
- add_transport(SvcName, {listen, Opts}).
-
-add_connector(SvcName, Opts) ->
- add_transport(SvcName, {connect, Opts}).
-
%%% --------------------------------------------------------------------------
%%% remove_transport/2
%%% --------------------------------------------------------------------------
@@ -149,12 +133,6 @@ add_connector(SvcName, Opts) ->
remove_transport(SvcName, Pred) ->
diameter_config:remove_transport(SvcName, Pred).
-remove_listener(SvcName, Pred) ->
- remove_transport(SvcName, {listen, Pred}).
-
-remove_connector(SvcName, Pred) ->
- remove_transport(SvcName, {connect, Pred}).
-
%%% --------------------------------------------------------------------------
%%% # subscribe(SvcName)
%%%
diff --git a/lib/diameter/src/app/diameter_service.erl b/lib/diameter/src/app/diameter_service.erl
index 82a8d7a994..63b0649dc4 100644
--- a/lib/diameter/src/app/diameter_service.erl
+++ b/lib/diameter/src/app/diameter_service.erl
@@ -1278,18 +1278,15 @@ send_request({TPid, Caps, App}, Msg, Opts, Caller, SvcName) ->
%% make_packet/1
%%
%% Turn an outgoing request as passed to call/4 into a diameter_packet
-%% record in preparation for a prepare_request callback. There are two
-%% cases: a diameter_packet as argument when we're calling call/4
-%% ourselves in order to relay a request or a bare message in case the
-%% call came by way of diameter:call/4.
+%% record in preparation for a prepare_request callback.
make_packet(Bin)
when is_binary(Bin) ->
#diameter_packet{header = diameter_codec:decode_header(Bin),
bin = Bin};
-make_packet(#diameter_packet{msg = [#diameter_header{} | _]} = Pkt) ->
- Pkt;
+make_packet(#diameter_packet{msg = [#diameter_header{} = Hdr | Avps]} = Pkt) ->
+ Pkt#diameter_packet{msg = [make_header(Hdr) | Avps]};
make_packet(#diameter_packet{header = Hdr} = Pkt) ->
Pkt#diameter_packet{header = make_header(Hdr)};
@@ -1955,6 +1952,7 @@ is_loop(Code, Vid, OH, Avps) ->
%%
%% Send a locally originating reply.
+%% No errors or a diameter_header/avp list.
reply(Msg, Dict, TPid, #diameter_packet{errors = Es,
transport_data = TD}
= ReqPkt)
@@ -1964,11 +1962,7 @@ reply(Msg, Dict, TPid, #diameter_packet{errors = Es,
incr(send, Pkt, Dict, TPid), %% count result codes in sent answers
send(TPid, Pkt#diameter_packet{transport_data = TD});
-%% Simplify the handling of error cases by accepting a list consisting
-%% of an answer record followed by failed AVPs to be packed into a
-%% Failed-AVP field, either directly or into an AVP field. Only if
-%% the message is a tuple-list or record however, not a list
-%% with a list of #diameter_header{} and #diameter_avp{}.
+%% Or not: set Result-Code and Failed-AVP AVP's.
reply(Msg, Dict, TPid, #diameter_packet{errors = [H|_] = Es} = Pkt) ->
reply(rc(Msg, rc(H), [A || {_,A} <- Es], Dict),
Dict,
diff --git a/lib/diameter/src/compiler/Makefile b/lib/diameter/src/compiler/Makefile
index 8512eb515a..3ab76064ac 100644
--- a/lib/diameter/src/compiler/Makefile
+++ b/lib/diameter/src/compiler/Makefile
@@ -130,7 +130,7 @@ force:
depend: depend.mk
# Generate dependencies makefile.
-depend.mk: ../app/depend.sed $(ERL_FILES) modules.mk Makefile
+depend.mk: ../app/depend.sed $(ERL_FILES) Makefile
for f in $(MODULES); do \
sed -f $< $$f.erl | sed "s@/@/$$f@"; \
done \
diff --git a/lib/diameter/src/transport/Makefile b/lib/diameter/src/transport/Makefile
index 5dc1772796..4b53100fd2 100644
--- a/lib/diameter/src/transport/Makefile
+++ b/lib/diameter/src/transport/Makefile
@@ -130,7 +130,7 @@ force:
depend: depend.mk
# Generate dependencies makefile.
-depend.mk: ../app/depend.sed $(ERL_FILES) modules.mk Makefile
+depend.mk: ../app/depend.sed $(ERL_FILES) Makefile
for f in $(MODULES); do \
sed -f $< $$f.erl | sed "s@/@/$$f@"; \
done \