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

Commit e9d53750 authored by Neil Fuller's avatar Neil Fuller
Browse files

Switch from InetUnixAddress to UnixSocketAddress

UnixSocketAddress is replacing InetUnixAddress.

Bug: 3106438
Change-Id: I7c03fa357adfb3221908294fd254c8faae91fd1b
parent 4fa438ef
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.system.ErrnoException;
import android.system.Os;
import android.system.StructTimeval;
import android.system.StructUcred;
import android.system.UnixSocketAddress;
import android.util.Slog;

import static android.system.OsConstants.*;
@@ -30,7 +31,6 @@ import java.io.File;
import java.io.FileDescriptor;
import java.io.InterruptedIOException;
import java.net.InetSocketAddress;
import java.net.InetUnixAddress;

/**
 * Set up a Unix domain socket that debuggerd will connect() to in
@@ -117,8 +117,9 @@ final class NativeCrashListener extends Thread {

        try {
            FileDescriptor serverFd = Os.socket(AF_UNIX, SOCK_STREAM, 0);
            final InetUnixAddress sockAddr = new InetUnixAddress(DEBUGGERD_SOCKET_PATH);
            Os.bind(serverFd, sockAddr, 0);
            final UnixSocketAddress sockAddr = UnixSocketAddress.createFileSystem(
                    DEBUGGERD_SOCKET_PATH);
            Os.bind(serverFd, sockAddr);
            Os.listen(serverFd, 1);

            while (true) {