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
|
||||
(Result : out Tkmrpc.Results.Result_Type;
|
||||
Address : Interfaces.C.Strings.chars_ptr)
|
||||
procedure Init (Address : Interfaces.C.Strings.chars_ptr)
|
||||
is
|
||||
Path : constant String := Interfaces.C.Strings.Value (Address);
|
||||
begin
|
||||
Sock.Init;
|
||||
Sock.Bind (Path => Anet.Sockets.Unix.Path_Type (Path));
|
||||
Receiver.Listen (Callback => Dispatch'Access);
|
||||
|
||||
Result := Tkmrpc.Results.Ok;
|
||||
|
||||
exception
|
||||
when others =>
|
||||
Result := Tkmrpc.Results.Invalid_Operation;
|
||||
end Init;
|
||||
|
||||
end Esa_Event_Service;
|
||||
|
||||
@@ -16,16 +16,11 @@
|
||||
|
||||
with Interfaces.C.Strings;
|
||||
|
||||
with Tkmrpc.Results;
|
||||
|
||||
package Esa_Event_Service
|
||||
is
|
||||
|
||||
procedure Init
|
||||
(Result : out Tkmrpc.Results.Result_Type;
|
||||
Address : Interfaces.C.Strings.chars_ptr);
|
||||
procedure Init (Address : Interfaces.C.Strings.chars_ptr);
|
||||
pragma Export (C, Init, "ees_server_init");
|
||||
pragma Export_Valued_Procedure (Init);
|
||||
-- Initialize Esa Event Service (EES) with given address.
|
||||
|
||||
procedure Finalize;
|
||||
|
||||
@@ -69,12 +69,8 @@ bool tkm_init()
|
||||
tkmlib_final();
|
||||
return FALSE;
|
||||
}
|
||||
/* init esa event service */
|
||||
if (ees_server_init(EES_SOCKET) != TKM_OK)
|
||||
{
|
||||
tkmlib_final();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ees_server_init(EES_SOCKET);
|
||||
|
||||
if (ike_tkm_reset() != TKM_OK)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user