From b873a5b3524ff31d232d4af0da5efcc1a9687ae3 Mon Sep 17 00:00:00 2001
From: Micael Karlberg
Date: Wed, 21 Dec 2011 15:30:55 +0100
Subject: [megaco] Fixed faulty test case (connect)
---
lib/megaco/doc/src/notes.xml | 62 ++++++++++++++++++++++++++++++++++++
lib/megaco/src/app/megaco.appup.src | 11 +++++++
lib/megaco/test/megaco_mess_test.erl | 28 +++++++++-------
lib/megaco/vsn.mk | 2 +-
4 files changed, 90 insertions(+), 13 deletions(-)
diff --git a/lib/megaco/doc/src/notes.xml b/lib/megaco/doc/src/notes.xml
index d9c575885f..35da9513b9 100644
--- a/lib/megaco/doc/src/notes.xml
+++ b/lib/megaco/doc/src/notes.xml
@@ -36,6 +36,68 @@
section is the version number of Megaco.
+ Megaco 3.16
Version 3.16 supports code replacement in runtime from/to
diff --git a/lib/megaco/src/app/megaco.appup.src b/lib/megaco/src/app/megaco.appup.src
index 3c9740818a..b79a4bee1a 100644
--- a/lib/megaco/src/app/megaco.appup.src
+++ b/lib/megaco/src/app/megaco.appup.src
@@ -142,10 +142,17 @@
%% |
%% v
%% 3.16
+%% |
+%% v
+%% 3.16.0.1
%%
%%
{"%VSN%",
[
+ {"3.16",
+ [
+ ]
+ },
{"3.15.1.1",
[
{restart_application, megaco}
@@ -163,6 +170,10 @@
}
],
[
+ {"3.16",
+ [
+ ]
+ },
{"3.15.1.1",
[
{restart_application, megaco}
diff --git a/lib/megaco/test/megaco_mess_test.erl b/lib/megaco/test/megaco_mess_test.erl
index 8bafab1aba..97a3bfd423 100644
--- a/lib/megaco/test/megaco_mess_test.erl
+++ b/lib/megaco/test/megaco_mess_test.erl
@@ -324,9 +324,6 @@
min(M) -> timer:minutes(M).
%% Test server callbacks
-% init_per_testcase(pending_ack = Case, Config) ->
-% put(dbg,true),
-% megaco_test_lib:init_per_testcase(Case, Config);
init_per_testcase(otp_7189 = Case, Config) ->
C = lists:keydelete(tc_timeout, 1, Config),
megaco_test_lib:init_per_testcase(Case, [{tc_timeout, min(2)} |C]);
@@ -337,9 +334,6 @@ init_per_testcase(Case, Config) ->
C = lists:keydelete(tc_timeout, 1, Config),
megaco_test_lib:init_per_testcase(Case, [{tc_timeout, min(1)} |C]).
-% end_per_testcase(pending_ack = Case, Config) ->
-% erase(dbg),
-% megaco_test_lib:end_per_testcase(Case, Config);
end_per_testcase(Case, Config) ->
megaco_test_lib:end_per_testcase(Case, Config).
@@ -434,6 +428,7 @@ connect(suite) ->
connect(doc) ->
[];
connect(Config) when is_list(Config) ->
+ %% ?SKIP("Needs a re-write..."),
?ACQUIRE_NODES(1, Config),
PrelMid = preliminary_mid,
MgMid = ipv4_mid(4711),
@@ -457,16 +452,25 @@ connect(Config) when is_list(Config) ->
?VERIFY(bad_send_mod, megaco:conn_info(PrelCH, send_mod)),
SC = service_change_request(),
case megaco:call(PrelCH, [SC], []) of
- {error,
- {send_message_failed,
- {'EXIT', {undef, [{bad_send_mod, send_message, [sh, _]} | _]}}}} ->
+ {_Version,
+ {error,
+ {send_message_failed,
+ {'EXIT', {undef, [{bad_send_mod, send_message, [sh, _]} | _]}}}}
+ } ->
+ %% R14B and previous
+ ?LOG("expected send failure (1)", []),
ok;
%% As of R15, we also get some extra info (e.g. line numbers)
- {error,
- {send_message_failed,
- {'EXIT', {undef, [{bad_send_mod, send_message, [sh, _], _} | _]}}}} ->
+ {_Version,
+ {error,
+ {send_message_failed,
+ {'EXIT', {undef, [{bad_send_mod, send_message, [sh, _], _} | _]}}}}
+ } ->
+ %% R15B and later
+ ?LOG("expected send failure (2)", []),
ok;
+
Unexpected ->
?ERROR(Unexpected)
end,
diff --git a/lib/megaco/vsn.mk b/lib/megaco/vsn.mk
index bb6f5f554a..3c4395cb30 100644
--- a/lib/megaco/vsn.mk
+++ b/lib/megaco/vsn.mk
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = megaco
-MEGACO_VSN = 3.16
+MEGACO_VSN = 3.16.0.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(MEGACO_VSN)$(PRE_VSN)"
--
cgit v1.2.3
From 67c16b43c5d33c2e4b4dfd226b4508d091336373 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?=
Date: Wed, 15 Feb 2012 04:26:48 +0100
Subject: Fix a code snippet and two typos in the doc
---
lib/stdlib/doc/src/ets.xml | 2 +-
lib/stdlib/doc/src/lists.xml | 2 +-
system/doc/tutorial/c_portdriver.xmlsrc | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml
index efd9514db6..0486090e92 100644
--- a/lib/stdlib/doc/src/ets.xml
+++ b/lib/stdlib/doc/src/ets.xml
@@ -671,7 +671,7 @@ ets:is_compiled_ms(Broken).
duplicate_bag, the function returns a list of
arbitrary length.
Note that the time order of object insertions is preserved;
- The first object inserted with the given key will be first
+ the first object inserted with the given key will be first
in the resulting list, and so on.
Insert and look-up times in tables of type set,
bag and duplicate_bag are constant, regardless
diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml
index 7042c84437..96a0942710 100644
--- a/lib/stdlib/doc/src/lists.xml
+++ b/lib/stdlib/doc/src/lists.xml
@@ -663,7 +663,7 @@ splitwith(Pred, List) ->
Returns the sub-list of List1 starting at position 1
and with (max) Len elements. It is not an error for
- Len to exceed the length of the list -- in that case
+ Len to exceed the length of the list, in that case
the whole list is returned.
diff --git a/system/doc/tutorial/c_portdriver.xmlsrc b/system/doc/tutorial/c_portdriver.xmlsrc
index f875fa80d2..e6887a25d1 100644
--- a/system/doc/tutorial/c_portdriver.xmlsrc
+++ b/system/doc/tutorial/c_portdriver.xmlsrc
@@ -68,8 +68,8 @@
start(SharedLib) ->
case erl_ddll:load_driver(".", SharedLib) of
ok -> ok;
-\011{error, already_loaded} -> ok;
-\011_ -> exit({error, could_not_load_driver})
+ {error, already_loaded} -> ok;
+ _ -> exit({error, could_not_load_driver})
end,
spawn(?MODULE, init, [SharedLib]).
@@ -102,7 +102,7 @@ loop(Port) ->
{call, Caller, Msg} ->
Port ! {self(), {command, encode(Msg)}},
receive
-\011 {Port, {data, Data}} ->
+ {Port, {data, Data}} ->
Caller ! {complex, decode(Data)}
end,
loop(Port)
--
cgit v1.2.3
From f195d88713035ec23e4d1c2c2e09f73bb2178481 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?=
Date: Fri, 24 Feb 2012 14:35:34 +0100
Subject: Remove trailing spaces
---
lib/stdlib/src/supervisor.erl | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index ac5b078c29..17e37e154e 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -566,13 +566,12 @@ check_flags(What) ->
{bad_flags, What}.
update_childspec(State, StartSpec) when ?is_simple(State) ->
- case check_startspec(StartSpec) of
- {ok, [Child]} ->
- {ok, State#state{children = [Child]}};
- Error ->
- {error, Error}
- end;
-
+ case check_startspec(StartSpec) of
+ {ok, [Child]} ->
+ {ok, State#state{children = [Child]}};
+ Error ->
+ {error, Error}
+ end;
update_childspec(State, StartSpec) ->
case check_startspec(StartSpec) of
{ok, Children} ->
@@ -592,7 +591,7 @@ update_childspec1([Child|OldC], Children, KeepOld) ->
end;
update_childspec1([], Children, KeepOld) ->
%% Return them in (kept) reverse start order.
- lists:reverse(Children ++ KeepOld).
+ lists:reverse(Children ++ KeepOld).
update_chsp(OldCh, Children) ->
case lists:map(fun(Ch) when OldCh#child.name =:= Ch#child.name ->
--
cgit v1.2.3
From c165d6c76fd99a0b3d91677b4531d9ee00c97dae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?=
Date: Fri, 24 Feb 2012 14:36:05 +0100
Subject: Add the type restrictions in the code comments
---
lib/stdlib/src/supervisor.erl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 17e37e154e..b49550ff6d 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -1055,9 +1055,9 @@ remove_child(Child, State) ->
%% Args: SupName = {local, atom()} | {global, atom()} | self
%% Type = {Strategy, MaxIntensity, Period}
%% Strategy = one_for_one | one_for_all | simple_one_for_one |
-%% rest_for_one
-%% MaxIntensity = integer()
-%% Period = integer()
+%% rest_for_one
+%% MaxIntensity = integer() >= 0
+%% Period = integer() > 0
%% Mod :== atom()
%% Args :== term()
%% Purpose: Check that Type is of correct type (!)
@@ -1108,7 +1108,7 @@ supname(N, _) -> N.
%%% where Name is an atom
%%% Func is {Mod, Fun, Args} == {atom(), atom(), list()}
%%% RestartType is permanent | temporary | transient
-%%% Shutdown = integer() | infinity | brutal_kill
+%%% Shutdown = integer() > 0 | infinity | brutal_kill
%%% ChildType = supervisor | worker
%%% Modules = [atom()] | dynamic
%%% Returns: {ok, [child_rec()]} | Error
--
cgit v1.2.3
From 005fd391b1a212b09f45ee9900441014ec19c1a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?=
Date: Fri, 24 Feb 2012 14:47:41 +0100
Subject: Fix supervisor doc: Shutdown, MaxR and MaxT type specs
The next code snippets from supervisor.erl show that Shutdown from a
child specification must be greater than zero and the same applies to
MaxT.
--- supervisor.erl ----------------------------------------------------------
validShutdown(Shutdown, _)
when is_integer(Shutdown), Shutdown > 0 -> true;
validShutdown(infinity, _) -> true;
validShutdown(brutal_kill, _) -> true;
validShutdown(Shutdown, _) -> throw({invalid_shutdown, Shutdown}).
validIntensity(Max) when is_integer(Max),
Max >= 0 -> true;
validIntensity(What) -> throw({invalid_intensity, What}).
validPeriod(Period) when is_integer(Period),
Period > 0 -> true;
validPeriod(What) -> throw({invalid_period, What}).
-----------------------------------------------------------------------------
---
lib/stdlib/doc/src/supervisor.xml | 5 +++--
system/doc/design_principles/sup_princ.xml | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index 33a7f5bb6a..ab360fbb6f 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -114,7 +114,7 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
M = F = atom()
A = [term()]
Restart = permanent | transient | temporary
- Shutdown = brutal_kill | int()>=0 | infinity
+ Shutdown = brutal_kill | int()>0 | infinity
Type = worker | supervisor
Modules = [Module] | dynamic
Module = atom()
@@ -517,7 +517,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
Args = term()
Result = {ok,{{RestartStrategy,MaxR,MaxT},[ChildSpec]}} | ignore
RestartStrategy = strategy()
- MaxR = MaxT = integer()>=0
+ MaxR = integer()>=0
+ MaxT = integer()>0
ChildSpec = child_spec()
diff --git a/system/doc/design_principles/sup_princ.xml b/system/doc/design_principles/sup_princ.xml
index c473e257fa..353430752c 100644
--- a/system/doc/design_principles/sup_princ.xml
+++ b/system/doc/design_principles/sup_princ.xml
@@ -136,7 +136,7 @@ init(...) ->
M = F = atom()
A = [term()]
Restart = permanent | transient | temporary
- Shutdown = brutal_kill | integer()>=0 | infinity
+ Shutdown = brutal_kill | integer()>0 | infinity
Type = worker | supervisor
Modules = [Module] | dynamic
Module = atom()]]>
--
cgit v1.2.3
From b5b00bef5d654006b15c44abbfe5aae3de9d3572 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?=
Date: Fri, 24 Feb 2012 15:03:21 +0100
Subject: Cosmetic: split very long lines from supervisor doc
---
lib/stdlib/doc/src/supervisor.xml | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index ab360fbb6f..ff06b04d07 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -55,7 +55,8 @@
monitoring its child processes. The basic idea of a supervisor is
that it should keep its child processes alive by restarting them
when necessary.
- The children of a supervisor is defined as a list of child specifications. When the supervisor is started, the child
+
The children of a supervisor is defined as a list of
+ child specifications. When the supervisor is started, the child
processes are started in order from left to right according to
this list. When the supervisor terminates, it first terminates
its child processes in reversed start order, from right to left.
@@ -100,7 +101,8 @@
To prevent a supervisor from getting into an infinite loop of
- child process terminations and restarts, a maximum restart frequency is defined using two integer values MaxR
+ child process terminations and restarts, a maximum restart frequency
+ is defined using two integer values MaxR
and MaxT. If more than MaxR restarts occur within
MaxT seconds, the supervisor terminates all child
processes and then itself.
@@ -197,7 +199,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
the callback module, if the child process is a supervisor,
gen_server or gen_fsm. If the child process is an event
manager (gen_event) with a dynamic set of callback modules,
- Modules should be dynamic. See OTP Design Principles for more information about release handling.
+ Modules should be dynamic. See OTP Design Principles
+ for more information about release handling.
-
Internally, the supervisor also keeps track of the pid
@@ -434,7 +437,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
- Return information about all children specifications and child processes belonging to a supervisor.
+ Return information about all children specifications and
+ child processes belonging to a supervisor.
Returns a newly created list with information about all child
specifications and child processes belonging to
@@ -467,7 +471,8 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
- Return counts for the number of childspecs, active children, supervisors and workers.
+ Return counts for the number of childspecs, active children,
+ supervisors and workers.
Returns a property list (see proplists) containing the
counts for each of the following elements of the supervisor's
--
cgit v1.2.3
From 4c8b2b9b58b06f1a72cddceb7c915129eb89152e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?=
Date: Tue, 28 Feb 2012 18:07:12 +0100
Subject: Remove/add extra/missing white spaces
---
lib/ssl/doc/src/ssl.xml | 4 ++--
system/doc/efficiency_guide/profiling.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
index 50268ae206..4910a6f1b8 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -62,8 +62,8 @@
For valid options
- see inet(3) and
- gen_tcp(3) .
+ see inet(3) and
+ gen_tcp(3).
ssloption() = {verify, verify_type()} |
diff --git a/system/doc/efficiency_guide/profiling.xml b/system/doc/efficiency_guide/profiling.xml
index 65ba4b3369..230aa3504b 100644
--- a/system/doc/efficiency_guide/profiling.xml
+++ b/system/doc/efficiency_guide/profiling.xml
@@ -116,7 +116,7 @@
minimize runtime performance impact. Using fprof is just a
matter of calling a few library functions, see
fprof
- manual page under the application tools.fprof was introduced in
+ manual page under the application tools. fprof was introduced in
version R8 of Erlang/OTP.
--
cgit v1.2.3
From 33cc284345798e343d52656fb4b158c06938aea3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ricardo=20Catalinas=20Jim=C3=A9nez?=