Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f807899 authored by ludi's avatar ludi
Browse files

Remove return value of ipSecAddSecurityAssociation

Bug:38350493

Test: runtest frameworks-net

Change-Id: I48f8462d94e8c4e95d6766c1ce7f24b8a596b743
parent a65aa77c
Loading
Loading
Loading
Loading
+25 −30
Original line number Diff line number Diff line
@@ -605,7 +605,6 @@ public class IpSecService extends IIpSecService.Stub {
            spis[direction] = mSpiRecords.get(c.getSpiResourceId(direction));
            int spi = spis[direction].getSpi();
            try {
                int result =
                getNetdInstance()
                        .ipSecAddSecurityAssociation(
                                resourceId,
@@ -630,13 +629,9 @@ public class IpSecService extends IIpSecService.Stub {
                                encapType,
                                encapLocalPort,
                                encapRemotePort);
                if (result != spi) {
                    // TODO: cleanup the first SA if creation of second SA fails
                    return new IpSecTransformResponse(
                            IpSecManager.Status.SPI_UNAVAILABLE, INVALID_RESOURCE_ID);
                }
            } catch (ServiceSpecificException e) {
                // FIXME: get the error code and throw is at an IOException from Errno Exception
                return new IpSecTransformResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE);
            }
        }
        // Both SAs were created successfully, time to construct a record and lock it away