Skip to content

Commit

Permalink
Rename to rtpproxy_notifier
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
  • Loading branch information
lemenkov committed Sep 1, 2011
1 parent 6ba8422 commit 6f00b2a
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -3,7 +3,7 @@ REBAR_FLAGS ?=

VSN := "0.0.4"
BUILD_DATE := `LANG=C date +"%a %b %d %Y"`
NAME := rtpproxy_radius
NAME := rtpproxy_notifier

ERLANG_ROOT := $(shell erl -eval 'io:format("~s", [code:root_dir()])' -s init stop -noshell)
ERLDIR=$(ERLANG_ROOT)/lib/$(NAME)-$(VSN)
Expand Down
@@ -1,17 +1,17 @@
%global realname rtpproxy_radius
%global realname rtpproxy_notifier
%global debug_package %{nil}
%global git_tag 1234567
%global patchnumber 0


Name: erlrtpproxy-radius
Name: erlrtpproxy-notifier
Version: %VSN%
Release: 1%{?dist}
Summary: RADIUS add-on for RTP proxying daemon
Summary: Notification add-on for RTP proxying daemon
Group: Applications/Internet
License: GPLv3+
URL: https://github.com/lemenkov/erlrtpproxy-radius
# wget --no-check-certificate https://github.com/lemenkov/erlrtpproxy-radius/tarball/%VSN%
URL: https://github.com/lemenkov/erlrtpproxy-notifier
# wget --no-check-certificate https://github.com/lemenkov/erlrtpproxy-notifier/tarball/%VSN%
Source0: lemenkov-%{name}-%{version}-%{patchnumber}-g%{git_tag}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Expand All @@ -22,7 +22,8 @@ Requires: erlang-eradius


%description
RADIUS add-on for RTP proxying daemon.
Notification add-on for RTP proxying daemon. It supports RADIUS
and rtpproxy's own simple notification extension.


%prep
Expand Down
@@ -1,5 +1,5 @@
[
{rtpproxy_radius,
{rtpproxy_notifier,
[
{radacct_servers, [[{127,0,0,1},1813,"testradacctpass"]]}
]
Expand Down
6 changes: 3 additions & 3 deletions rebar.config
@@ -1,6 +1,6 @@
{pre_hooks, [{compile, "sed -e \"s,%VSN%,${VSN},g;s,%DATE%,${BUILD_DATE},g\" priv/erlrtpproxy-radius.spec.in > priv/erlrtpproxy-radius.spec"}]}.
{post_hooks, [{compile, "sed -i -e \"s,%VSN%,${VSN},g\" ebin/rtpproxy_radius.app"}]}.
{clean_files, ["priv/erlrtpproxy-radius.spec"]}.
{pre_hooks, [{compile, "sed -e \"s,%VSN%,${VSN},g;s,%DATE%,${BUILD_DATE},g\" priv/erlrtpproxy-notifier.spec.in > priv/erlrtpproxy-notifier.spec"}]}.
{post_hooks, [{compile, "sed -i -e \"s,%VSN%,${VSN},g\" ebin/rtpproxy_notifier.app"}]}.
{clean_files, ["priv/erlrtpproxy-notifier.spec"]}.
{cover_enabled, true}.
{erl_opts, [debug_info]}.

4 changes: 2 additions & 2 deletions src/rtpproxy_radius.app.src → src/rtpproxy_notifier.app.src
@@ -1,4 +1,4 @@
{application, rtpproxy_radius,
{application, rtpproxy_notifier,
[
{description, ""},
{vsn, "1"},
Expand All @@ -7,6 +7,6 @@
kernel,
stdlib
]},
{mod, { rtpproxy_radius_app, []}},
{mod, { rtpproxy_notifier_app, []}},
{env, []}
]}.
6 changes: 3 additions & 3 deletions src/rtpproxy_radius.erl → src/rtpproxy_notifier.erl
@@ -1,4 +1,4 @@
-module(rtpproxy_radius).
-module(rtpproxy_notifier).

-behaviour(gen_server).

Expand All @@ -18,13 +18,13 @@ start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).

init(_) ->
error_logger:info_msg("Starting rtpproxy_radius at ~p~n", [node()]),
error_logger:info_msg("Starting rtpproxy_notifier at ~p~n", [node()]),
{ok, RadAcctServers} = application:get_env(?MODULE, radacct_servers),
eradius_dict:start(),
eradius_dict:load_tables(["dictionary", "dictionary_cisco"]),
eradius_acc:start(),
?MODULE = ets:new(?MODULE, [public, named_table]),
error_logger:info_msg("Started rtpproxy_radius at ~p~n", [node()]),
error_logger:info_msg("Started rtpproxy_notifier at ~p~n", [node()]),
{ok, #rad_accreq{servers=RadAcctServers}}.

handle_call(Message, From, State) ->
Expand Down
4 changes: 2 additions & 2 deletions src/rtpproxy_radius_app.erl → src/rtpproxy_notifier_app.erl
@@ -1,4 +1,4 @@
-module(rtpproxy_radius_app).
-module(rtpproxy_notifier_app).

-behaviour(application).

Expand All @@ -10,7 +10,7 @@
%% ===================================================================

start(_StartType, _StartArgs) ->
rtpproxy_radius_sup:start_link().
rtpproxy_notifier_sup:start_link().

stop(_State) ->
ok.
4 changes: 2 additions & 2 deletions src/rtpproxy_radius_sup.erl → src/rtpproxy_notifier_sup.erl
@@ -1,4 +1,4 @@
-module(rtpproxy_radius_sup).
-module(rtpproxy_notifier_sup).

-behaviour(supervisor).

Expand All @@ -23,5 +23,5 @@ start_link() ->
%% ===================================================================

init([]) ->
{ok, { {one_for_one, 5, 10}, [?CHILD(rtpproxy_radius,worker)]} }.
{ok, { {one_for_one, 5, 10}, [?CHILD(rtpproxy_notifier, worker)]} }.

0 comments on commit 6f00b2a

Please sign in to comment.