Remove result out parameter from EES Init
Error processing is done by the registered exception handler.
This commit is contained in:
committed by
Tobias Brunner
parent
0f5e57fe26
commit
3360bad910
@@ -45,21 +45,13 @@ is
|
|||||||
|
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure Init
|
procedure Init (Address : Interfaces.C.Strings.chars_ptr)
|
||||||
(Result : out Tkmrpc.Results.Result_Type;
|
|
||||||
Address : Interfaces.C.Strings.chars_ptr)
|
|
||||||
is
|
is
|
||||||
Path : constant String := Interfaces.C.Strings.Value (Address);
|
Path : constant String := Interfaces.C.Strings.Value (Address);
|
||||||
begin
|
begin
|
||||||
Sock.Init;
|
Sock.Init;
|
||||||
Sock.Bind (Path => Anet.Sockets.Unix.Path_Type (Path));
|
Sock.Bind (Path => Anet.Sockets.Unix.Path_Type (Path));
|
||||||
Receiver.Listen (Callback => Dispatch'Access);
|
Receiver.Listen (Callback => Dispatch'Access);
|
||||||
|
|
||||||
Result := Tkmrpc.Results.Ok;
|
|
||||||
|
|
||||||
exception
|
|
||||||
when others =>
|
|
||||||
Result := Tkmrpc.Results.Invalid_Operation;
|
|
||||||
end Init;
|
end Init;
|
||||||
|
|
||||||
end Esa_Event_Service;
|
end Esa_Event_Service;
|
||||||
|
|||||||
@@ -16,16 +16,11 @@
|
|||||||
|
|
||||||
with Interfaces.C.Strings;
|
with Interfaces.C.Strings;
|
||||||
|
|
||||||
with Tkmrpc.Results;
|
|
||||||
|
|
||||||
package Esa_Event_Service
|
package Esa_Event_Service
|
||||||
is
|
is
|
||||||
|
|
||||||
procedure Init
|
procedure Init (Address : Interfaces.C.Strings.chars_ptr);
|
||||||
(Result : out Tkmrpc.Results.Result_Type;
|
|
||||||
Address : Interfaces.C.Strings.chars_ptr);
|
|
||||||
pragma Export (C, Init, "ees_server_init");
|
pragma Export (C, Init, "ees_server_init");
|
||||||
pragma Export_Valued_Procedure (Init);
|
|
||||||
-- Initialize Esa Event Service (EES) with given address.
|
-- Initialize Esa Event Service (EES) with given address.
|
||||||
|
|
||||||
procedure Finalize;
|
procedure Finalize;
|
||||||
|
|||||||
@@ -69,12 +69,8 @@ bool tkm_init()
|
|||||||
tkmlib_final();
|
tkmlib_final();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/* init esa event service */
|
|
||||||
if (ees_server_init(EES_SOCKET) != TKM_OK)
|
ees_server_init(EES_SOCKET);
|
||||||
{
|
|
||||||
tkmlib_final();
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ike_tkm_reset() != TKM_OK)
|
if (ike_tkm_reset() != TKM_OK)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user