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

Commit 2fa54ef2 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

recvfrom takes a non-const pointer.

Change-Id: Ib2c8f2710cb333904106f849f492c83697fdd937
parent 76ce8e52
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -615,12 +615,11 @@ bool CommonTimeServer::handlePacket() {


    ssize_t recvBytes = recvfrom(
    ssize_t recvBytes = recvfrom(
            mSocket, buf, sizeof(buf), 0,
            mSocket, buf, sizeof(buf), 0,
            reinterpret_cast<const sockaddr *>(&srcAddr), &srcAddrLen);
            reinterpret_cast<sockaddr *>(&srcAddr), &srcAddrLen);


    if (recvBytes < 0) {
    if (recvBytes < 0) {
        mBadPktLog.log(ANDROID_LOG_ERROR, LOG_TAG,
        mBadPktLog.log(ANDROID_LOG_ERROR, LOG_TAG, "recvfrom failed (%s)",
                       "recvfrom failed (res %d, errno %d)",
                       strerror(errno));
                       recvBytes, errno);
        return false;
        return false;
    }
    }