Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Commit 5cce2ea

Browse files
committed
fix muen block server test proof
ref #80
1 parent a8cf491 commit 5cce2ea

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/block/muen/componolit-gneiss-block.adb

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ is
7575
(True); -- TODO: Range check for Session_Id
7676

7777
function Identifier (S : Server_Session) return Session_Id is
78-
(Session_Id'Val (Standard.Interfaces.Unsigned_32'Pos (S.Tag) + Session_Id'Pos (Session_Id'Last)));
78+
(Session_Id'Val (Standard.Interfaces.Unsigned_32'Pos (S.Tag) + Session_Id'Pos (Session_Id'First)));
7979

8080
end Componolit.Gneiss.Block;

src/block/server/muen/componolit-gneiss-block-dispatcher.adb

+9-4
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ is
2626
(Serv.Event'Address) with
2727
SPARK_Mode => Off;
2828

29-
function Session_Address (D : Dispatcher_Session) return System.Address is
30-
(D'Address) with
31-
SPARK_Mode => Off;
29+
function Session_Address (D : Dispatcher_Session) return System.Address;
30+
31+
function Session_Address (D : Dispatcher_Session) return System.Address with
32+
SPARK_Mode => Off
33+
is
34+
begin
35+
return D'Address;
36+
end Session_Address;
3237

3338
procedure Initialize (D : in out Dispatcher_Session;
3439
Cap : Componolit.Gneiss.Types.Capability;
@@ -44,7 +49,7 @@ is
4449
Block_Dispatch_Event => System.Null_Address,
4550
Tag => Standard.Interfaces.Unsigned_32'Val
4651
(Session_Id'Pos (Tag)
47-
- Session_Id'Pos (Session_Id'Last)),
52+
- Session_Id'Pos (Session_Id'First)),
4853
Session => Session_Address (D));
4954
exit;
5055
end if;

0 commit comments

Comments
 (0)