From 6ea4eb3aedc011194135493948f141729e36a8c7 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Thu, 15 Mar 2018 06:33:54 -0700
Subject: Fix init to allow all actions

---
 lib/stdlib/src/gen_statem.erl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'lib')

diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl
index b1d99e2e14..eb0d6bd742 100644
--- a/lib/stdlib/src/gen_statem.erl
+++ b/lib/stdlib/src/gen_statem.erl
@@ -677,9 +677,9 @@ enter(Module, Opts, State, Data, Server, Actions, Parent) ->
     NewDebug = ?sys_debug(Debug, {Name,State}, {enter,Event,State}),
     case call_callback_mode(S) of
 	#state{} = NewS ->
-	    loop_event_actions(
+	    loop_event_actions_list(
 	      Parent, NewDebug, NewS,
-	      Events, Event, State, Data, #trans_opts{},
+	      Events, Event, State, Data, false,
               NewActions, CallEnter);
 	[Class,Reason,Stacktrace] ->
 	    terminate(
@@ -1295,7 +1295,7 @@ parse_actions_next_event(
                 next_events_r = [{Type,Content}|NextEventsR]});
         _ ->
             [error,
-             {bad_action_from_state_function,{next_events,Type,Content}},
+             {bad_action_from_state_function,{next_event,Type,Content}},
              ?STACKTRACE(),
              ?not_sys_debug]
     end;
@@ -1312,7 +1312,7 @@ parse_actions_next_event(
                 next_events_r = [{Type,Content}|NextEventsR]});
         _ ->
             [error,
-             {bad_action_from_state_function,{next_events,Type,Content}},
+             {bad_action_from_state_function,{next_event,Type,Content}},
              ?STACKTRACE(),
              Debug]
     end.
-- 
cgit v1.2.3


From 57b6fd27292e1c80e8e443991b9a24d3f8ad92eb Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Sat, 17 Mar 2018 06:49:53 -0700
Subject: Test event insert from init

---
 lib/stdlib/test/gen_statem_SUITE.erl | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

(limited to 'lib')

diff --git a/lib/stdlib/test/gen_statem_SUITE.erl b/lib/stdlib/test/gen_statem_SUITE.erl
index 5b9daecfd3..270f1c294a 100644
--- a/lib/stdlib/test/gen_statem_SUITE.erl
+++ b/lib/stdlib/test/gen_statem_SUITE.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %%
-%% Copyright Ericsson AB 2016-2017. All Rights Reserved.
+%% Copyright Ericsson AB 2016-2018. All Rights Reserved.
 %%
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
 
 -include_lib("common_test/include/ct.hrl").
 
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 -behaviour(gen_statem).
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -832,9 +832,14 @@ event_types(_Config) ->
 	%% Abusing the internal format of From...
 	#{init =>
 	      fun () ->
-		      {ok, start, undefined}
+		      {ok, start1, undefined,
+		       [{next_event,internal,0}]}
 	      end,
-	  start =>
+	  start1 =>
+	      fun (internal, 0, undefined) ->
+		      {next_state, start2, undefined}
+	      end,
+	  start2 =>
 	      fun ({call,_} = Call, Req, undefined) ->
 		      {next_state, state1, undefined,
 		       [{next_event,internal,1},
-- 
cgit v1.2.3


From 1a93d0f54e4064b22923cc5cb426c82150ad4431 Mon Sep 17 00:00:00 2001
From: Hans Nilsson <hans@erlang.org>
Date: Tue, 20 Mar 2018 12:08:36 +0100
Subject: ssh: Fix bad spec for double_algs() in ssh.hrl

---
 lib/ssh/src/ssh.hrl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib')

diff --git a/lib/ssh/src/ssh.hrl b/lib/ssh/src/ssh.hrl
index 4711f54fb5..8d950eea3c 100644
--- a/lib/ssh/src/ssh.hrl
+++ b/lib/ssh/src/ssh.hrl
@@ -114,7 +114,7 @@
                              | {mac, double_algs()}
                              | {compression, double_algs()} .
 -type simple_algs()         :: list( atom() ) .
--type double_algs()         :: list( {client2serverlist,simple_algs()} | {server2client,simple_algs()} )
+-type double_algs()         :: list( {client2server,simple_algs()} | {server2client,simple_algs()} )
                              | simple_algs() .
 
 -type options() :: #{socket_options   := socket_options(),
-- 
cgit v1.2.3


From a77d73ada12dd82df33bc3c9ab4c9efa6232ff94 Mon Sep 17 00:00:00 2001
From: Erlang/OTP <otp@erlang.org>
Date: Wed, 21 Mar 2018 18:33:13 +0100
Subject: Update version numbers

---
 lib/ssh/vsn.mk    | 2 +-
 lib/stdlib/vsn.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'lib')

diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk
index 99c5cbd346..d5eed0b087 100644
--- a/lib/ssh/vsn.mk
+++ b/lib/ssh/vsn.mk
@@ -1,4 +1,4 @@
 #-*-makefile-*-   ; force emacs to enter makefile-mode
 
-SSH_VSN = 4.6.6
+SSH_VSN = 4.6.7
 APP_VSN    = "ssh-$(SSH_VSN)"
diff --git a/lib/stdlib/vsn.mk b/lib/stdlib/vsn.mk
index 8391389fc4..09a4d6fb50 100644
--- a/lib/stdlib/vsn.mk
+++ b/lib/stdlib/vsn.mk
@@ -1 +1 @@
-STDLIB_VSN = 3.4.4
+STDLIB_VSN = 3.4.5
-- 
cgit v1.2.3


From 8ed28dfa4434b2f885bc495a79a9670a32563781 Mon Sep 17 00:00:00 2001
From: Erlang/OTP <otp@erlang.org>
Date: Wed, 21 Mar 2018 18:33:26 +0100
Subject: Update release notes

---
 lib/ssh/doc/src/notes.xml    | 15 +++++++++++++++
 lib/stdlib/doc/src/notes.xml | 19 +++++++++++++++++++
 2 files changed, 34 insertions(+)

(limited to 'lib')

diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml
index ba563335a2..db60b4ab6f 100644
--- a/lib/ssh/doc/src/notes.xml
+++ b/lib/ssh/doc/src/notes.xml
@@ -30,6 +30,21 @@
     <file>notes.xml</file>
   </header>
 
+<section><title>Ssh 4.6.7</title>
+
+    <section><title>Fixed Bugs and Malfunctions</title>
+      <list>
+        <item>
+          <p>
+	    Fix bad spec in ssh.hrl: <c>double_algs()</c>.</p>
+          <p>
+	    Own Id: OTP-14990</p>
+        </item>
+      </list>
+    </section>
+
+</section>
+
 <section><title>Ssh 4.6.6</title>
 
     <section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml
index bf6b06859e..e26c4aba74 100644
--- a/lib/stdlib/doc/src/notes.xml
+++ b/lib/stdlib/doc/src/notes.xml
@@ -31,6 +31,25 @@
   </header>
   <p>This document describes the changes made to the STDLIB application.</p>
 
+<section><title>STDLIB 3.4.5</title>
+
+    <section><title>Fixed Bugs and Malfunctions</title>
+      <list>
+        <item>
+          <p>
+	    The <c>Module:init/1</c> function in <c>gen_statem</c>
+	    may return an actions list containing any action, but an
+	    erroneous check only allowed state enter actions so e.g
+	    <c>{next_event,internal,event}</c> caused a server crash.
+	    This bug has been fixed.</p>
+          <p>
+	    Own Id: OTP-13995</p>
+        </item>
+      </list>
+    </section>
+
+</section>
+
 <section><title>STDLIB 3.4.4</title>
 
     <section><title>Fixed Bugs and Malfunctions</title>
-- 
cgit v1.2.3