|
|
e31b2a6 |
From 4644c9071f0b272c95f99331bfbe5f6ca356fc77 Mon Sep 17 00:00:00 2001
|
|
|
e31b2a6 |
From: Pascal Obry <obry@adacore.com>
|
|
|
e31b2a6 |
Date: Mon, 19 Aug 2019 19:28:16 +0200
|
|
|
e31b2a6 |
Subject: [PATCH] Fix invalid code to conform to last GNAT version.
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
Some class-wide conversions were not properly detected as needed.
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
Part of S521-062.
|
|
|
e31b2a6 |
---
|
|
|
e31b2a6 |
src/core/aws-net-acceptors.adb | 6 +++---
|
|
|
e31b2a6 |
src/core/aws-server.adb | 2 +-
|
|
|
e31b2a6 |
src/extended/aws-server-hotplug.adb | 4 ++--
|
|
|
e31b2a6 |
3 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
diff --git a/src/core/aws-net-acceptors.adb b/src/core/aws-net-acceptors.adb
|
|
|
e31b2a6 |
index 0631d1f56..7c2f16a70 100644
|
|
|
e31b2a6 |
--- a/src/core/aws-net-acceptors.adb
|
|
|
e31b2a6 |
+++ b/src/core/aws-net-acceptors.adb
|
|
|
e31b2a6 |
@@ -507,7 +507,7 @@ package body AWS.Net.Acceptors is
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
procedure Add (S : not null access Socket_Type'Class) is
|
|
|
e31b2a6 |
begin
|
|
|
e31b2a6 |
- Sockets.Append (S);
|
|
|
e31b2a6 |
+ Sockets.Append (Socket_Access (S));
|
|
|
e31b2a6 |
end Add;
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
-----------
|
|
|
e31b2a6 |
@@ -647,7 +647,7 @@ package body AWS.Net.Acceptors is
|
|
|
e31b2a6 |
and then Acceptor.W_Signal /= null;
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
if Success then
|
|
|
e31b2a6 |
- Buffer.Append (S);
|
|
|
e31b2a6 |
+ Buffer.Append (Socket_Access (S));
|
|
|
e31b2a6 |
Acceptor.W_Signal.Send ((1 => Socket_Command));
|
|
|
e31b2a6 |
end if;
|
|
|
e31b2a6 |
end Add;
|
|
|
e31b2a6 |
diff --git a/src/core/aws-server.adb b/src/core/aws-server.adb
|
|
|
e31b2a6 |
index 419124460..4f6ce774e 100644
|
|
|
e31b2a6 |
--- a/src/core/aws-server.adb
|
|
|
e31b2a6 |
+++ b/src/core/aws-server.adb
|
|
|
e31b2a6 |
@@ -898,7 +898,7 @@ package body AWS.Server is
|
|
|
e31b2a6 |
begin
|
|
|
e31b2a6 |
pragma Assert (Count > 0);
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
- Table (Index).Sock := Socket;
|
|
|
e31b2a6 |
+ Table (Index).Sock := Socket_Access (Socket);
|
|
|
e31b2a6 |
Table (Index).Alive_Counter := 0;
|
|
|
e31b2a6 |
Table (Index).Alive_Time_Stamp := Ada.Calendar.Clock;
|
|
|
e31b2a6 |
Table (Index).Activity_Counter := Table (Index).Activity_Counter + 1;
|
|
|
e31b2a6 |
diff --git a/src/extended/aws-server-hotplug.adb b/src/extended/aws-server-hotplug.adb
|
|
|
e31b2a6 |
index c5176eec1..68d55a64d 100644
|
|
|
e31b2a6 |
--- a/src/extended/aws-server-hotplug.adb
|
|
|
e31b2a6 |
+++ b/src/extended/aws-server-hotplug.adb
|
|
|
e31b2a6 |
@@ -120,7 +120,7 @@ package body AWS.Server.Hotplug is
|
|
|
e31b2a6 |
Line : String_Split.Slice_Set;
|
|
|
e31b2a6 |
N : Natural := 0;
|
|
|
e31b2a6 |
begin
|
|
|
e31b2a6 |
- Hotplug_Server.Start (Port, Web_Server, Host => Host);
|
|
|
e31b2a6 |
+ Hotplug_Server.Start (Port, HTTP_Access (Web_Server), Host => Host);
|
|
|
e31b2a6 |
AWS.Hotplug.Set_Mode (Web_Server.Filters, Register_Mode);
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
Text_IO.Open (File, Text_IO.In_File, Authorization_File);
|
|
|
e31b2a6 |
From 364dab06828c4b6e519956cff6ce2ab3f08ef15c Mon Sep 17 00:00:00 2001
|
|
|
e31b2a6 |
From: Dmitriy Anisimkov <anisimko@adacore.com>
|
|
|
e31b2a6 |
Date: Thu, 11 Jul 2019 19:56:17 +0600
|
|
|
e31b2a6 |
Subject: [PATCH] Don't reconstruct the socket address
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
K530-015
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
Set Port to Get_Address_Info call instead. This need because Sock_Addr_Type
|
|
|
e31b2a6 |
going to became more complex when Unix local socket will be implemented.
|
|
|
e31b2a6 |
---
|
|
|
e31b2a6 |
config/src/aws-net-std__gnat.adb | 8 +++-----
|
|
|
e31b2a6 |
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
diff --git a/config/src/aws-net-std__gnat.adb b/config/src/aws-net-std__gnat.adb
|
|
|
e31b2a6 |
index 2963fd961..c74bb8aa5 100644
|
|
|
e31b2a6 |
--- a/config/src/aws-net-std__gnat.adb
|
|
|
e31b2a6 |
+++ b/config/src/aws-net-std__gnat.adb
|
|
|
e31b2a6 |
@@ -121,7 +121,8 @@ package body AWS.Net.Std is
|
|
|
e31b2a6 |
Keep_Excp : Exceptions.Exception_Occurrence;
|
|
|
e31b2a6 |
Addresses : Address_Info_Array :=
|
|
|
e31b2a6 |
Get_Address_Info
|
|
|
e31b2a6 |
- (Host, "", To_GNAT (Family), Passive => True);
|
|
|
e31b2a6 |
+ (Host, Utils.Image (Port), To_GNAT (Family),
|
|
|
e31b2a6 |
+ Passive => True);
|
|
|
e31b2a6 |
begin
|
|
|
e31b2a6 |
if Family = Family_Unspec then
|
|
|
e31b2a6 |
Sort (Addresses, IPv6_TCP_Preferred'Access);
|
|
|
e31b2a6 |
@@ -145,10 +146,7 @@ package body AWS.Net.Std is
|
|
|
e31b2a6 |
(Socket.S.FD, Socket_Level,
|
|
|
e31b2a6 |
Option => (Sockets.Reuse_Address, Enabled => Reuse_Address));
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
- Bind_Socket
|
|
|
e31b2a6 |
- (Socket.S.FD,
|
|
|
e31b2a6 |
- (Addr_Info.Addr.Family, Addr_Info.Addr.Addr,
|
|
|
e31b2a6 |
- Sockets.Port_Type (Port)));
|
|
|
e31b2a6 |
+ Bind_Socket (Socket.S.FD, Addr_Info.Addr);
|
|
|
e31b2a6 |
|
|
|
e31b2a6 |
return;
|
|
|
e31b2a6 |
|