fix a couple of places where we were leaking macaddrs into logs (kinda PII)

This commit is contained in:
geeksville
2020-07-07 10:44:06 -07:00
parent 777e0f6775
commit 979c7f407f
2 changed files with 4 additions and 3 deletions

View File

@@ -1508,7 +1508,7 @@ class MeshService : Service(), Logging {
val binder = object : IMeshService.Stub() {
override fun setDeviceAddress(deviceAddr: String?) = toRemoteExceptions {
debug("Passing through device change to radio service: $deviceAddr")
debug("Passing through device change to radio service: ${deviceAddr.anonymize}")
val res = radio.service.setDeviceAddress(deviceAddr)
if (res) {

View File

@@ -12,6 +12,7 @@ import com.geeksville.android.GeeksvilleApplication
import com.geeksville.android.Logging
import com.geeksville.concurrent.handledLaunch
import com.geeksville.mesh.IRadioInterfaceService
import com.geeksville.util.anonymize
import com.geeksville.util.ignoreException
import com.geeksville.util.toRemoteExceptions
import kotlinx.coroutines.CoroutineScope
@@ -216,7 +217,7 @@ class RadioInterfaceService : Service(), Logging {
if (address == null)
warn("No bonded mesh radio, can't start interface")
else {
info("Starting radio $address")
info("Starting radio ${address.anonymize}")
isStarted = true
if (logSends)
@@ -281,7 +282,7 @@ class RadioInterfaceService : Service(), Logging {
// The device address "n" can be used to mean none
debug("Setting bonded device to $address")
debug("Setting bonded device to ${address.anonymize}")
getPrefs(this).edit(commit = true) {
this.remove(DEVADDR_KEY_OLD) // remove any old version of the key