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

Commit c554c2c1 authored by Di Lu's avatar Di Lu Committed by android-build-merger
Browse files

Merge "Remove return value of ipSecAddSecurityAssociation" am: cd5c1161

am: 38e72983

Change-Id: I08b1498e05321b8cda04f56d07a0a5f50260d7d2
parents 59de8153 38e72983
Loading
Loading
Loading
Loading
+25 −30
Original line number Original line Diff line number Diff line
@@ -605,7 +605,6 @@ public class IpSecService extends IIpSecService.Stub {
            spis[direction] = mSpiRecords.get(c.getSpiResourceId(direction));
            spis[direction] = mSpiRecords.get(c.getSpiResourceId(direction));
            int spi = spis[direction].getSpi();
            int spi = spis[direction].getSpi();
            try {
            try {
                int result =
                getNetdInstance()
                getNetdInstance()
                        .ipSecAddSecurityAssociation(
                        .ipSecAddSecurityAssociation(
                                resourceId,
                                resourceId,
@@ -630,13 +629,9 @@ public class IpSecService extends IIpSecService.Stub {
                                encapType,
                                encapType,
                                encapLocalPort,
                                encapLocalPort,
                                encapRemotePort);
                                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) {
            } catch (ServiceSpecificException e) {
                // FIXME: get the error code and throw is at an IOException from Errno Exception
                // 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
        // Both SAs were created successfully, time to construct a record and lock it away