Skip to content

Commit

Permalink
Merge pull request #14 from PSU-Capstone-Team24/Fix-bounded-string-typo
Browse files Browse the repository at this point in the history
Fix bounded string typo
  • Loading branch information
masonticehurst authored Jan 28, 2024
2 parents c42dc43 + 3a3e12a commit 8751ccc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions eRINA_Linux/src/ada_src/bindings-rlite-api.adb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ package body Bindings.Rlite.API is
DIF_Name : String) return Rl_IPCP_Id_T is
begin
if Name'Length > Max_Length or Name'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

if DIF_Name'Length > Max_Length or DIF_Name'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

return Ctrl.RINA_Create_IPCP (Fd, To_Bounded_String (Name), DIF_Type, To_Bounded_String (DIF_Name));
Expand Down Expand Up @@ -65,11 +65,11 @@ package body Bindings.Rlite.API is
Flags : Integer) return OS.File_Descriptor is
begin
if DIF_Name'Length > Max_Length or DIF_Name'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

if Local_Appl'Length > Max_Length or Local_Appl'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

return Ctrl.RINA_Register_Common (Fd, To_Bounded_String (DIF_Name), To_Bounded_String (Local_Appl), Flags, 1);
Expand All @@ -82,11 +82,11 @@ package body Bindings.Rlite.API is
) return OS.File_Descriptor is
begin
if DIF_Name'Length > Max_Length or DIF_Name'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

if Local_Appl'Length > Max_Length or Local_Appl'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

return Ctrl.RINA_Register_Common (Fd, To_Bounded_String (DIF_Name), To_Bounded_String (Local_Appl), Flags, 0);
Expand All @@ -111,15 +111,15 @@ package body Bindings.Rlite.API is
) return OS.File_Descriptor is
begin
if DIF_Name'Length > Max_Length or DIF_Name'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

if Local_Appl'Length > Max_Length or Local_Appl'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

if Remote_Appl'Length > Max_Length or Remote_Appl'Length = 0 then
raise Exceptions.Bounded_Length_Expcetion;
raise Exceptions.Bounded_Length_Exception;
end if;

return Ctrl.RINA_Flow_Alloc(To_Bounded_String (DIF_Name), To_Bounded_String (Local_Appl), To_Bounded_String (Remote_Appl), Flowspec, Flags, 16#FFFF#);
Expand Down
2 changes: 1 addition & 1 deletion eRINA_Linux/src/ada_src/exceptions.ads
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ package Exceptions is
Flow_Acceptance_Failure : exception;
Not_Implemented_Exception : exception;
IPCP_Creation_Exception : exception;
Bounded_Length_Expcetion : exception;
Bounded_Length_Exception : exception;
end Exceptions;
8 changes: 4 additions & 4 deletions eRINA_Tests/src/test_rina_register.adb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ package body Test_RINA_Register is

Register_Success := RINA_Register (RINA_Dev_FD, DIF_Name, Dif_Name, 0);
exception
when Exceptions.Bounded_Length_Expcetion =>
when Exceptions.Bounded_Length_Exception =>
Caused_Error := True;

Assert(Caused_Error and Register_Success = Invalid_FD, "DIF_Name allowed to register with length > 128 characters");
Expand All @@ -72,7 +72,7 @@ package body Test_RINA_Register is
begin
Register_Success := RINA_Register (RINA_Dev_FD, "", Application_Name, 0);
exception
when Exceptions.Bounded_Length_Expcetion =>
when Exceptions.Bounded_Length_Exception =>
Caused_Error := True;

Assert(Caused_Error and Register_Success = Invalid_FD, "DIF_Name blank");
Expand All @@ -99,7 +99,7 @@ package body Test_RINA_Register is
begin
Register_Success := RINA_Register (RINA_Dev_FD, DIF_Name, App_Name, 0);
exception
when Exceptions.Bounded_Length_Expcetion =>
when Exceptions.Bounded_Length_Exception =>
Caused_Error := True;

Assert(Caused_Error and Register_Success = Invalid_FD, "Application_Name length > 128 characters");
Expand All @@ -112,7 +112,7 @@ package body Test_RINA_Register is
begin
Register_Success := RINA_Register (RINA_Dev_FD, DIF_Name, "", 0);
exception
when Exceptions.Bounded_Length_Expcetion =>
when Exceptions.Bounded_Length_Exception =>
Caused_Error := True;

Assert(Caused_Error and Register_Success = Invalid_FD, "Application_Name blank");
Expand Down
2 changes: 1 addition & 1 deletion eRINA_Tests/src/test_rina_unregister.adb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ package body Test_RINA_Unregister is

Unregister_Success := RINA_Unregister (RINA_Dev_FD, DIF_Name, App_Name, 0);
exception
when Exceptions.Bounded_Length_Expcetion =>
when Exceptions.Bounded_Length_Exception =>
Caused_Error := True;

Assert (Caused_Error and Unregister_Success = Invalid_FD, "DIF_Name is empty");
Expand Down

0 comments on commit 8751ccc

Please sign in to comment.