Merge "Disable cache flush bit in existing announcement" into main
This commit is contained in:
@@ -399,7 +399,9 @@ public class MdnsRecordRepository {
|
|||||||
r -> new MdnsPointerRecord(
|
r -> new MdnsPointerRecord(
|
||||||
r.record.getName(),
|
r.record.getName(),
|
||||||
0L /* receiptTimeMillis */,
|
0L /* receiptTimeMillis */,
|
||||||
true /* cacheFlush */,
|
// RFC6762#10.1, the cache flush bit should be false for existing
|
||||||
|
// announcement. Otherwise, the record will be deleted immediately.
|
||||||
|
false /* cacheFlush */,
|
||||||
0L /* ttlMillis */,
|
0L /* ttlMillis */,
|
||||||
r.record.getPointer()));
|
r.record.getPointer()));
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ class MdnsRecordRepositoryTest {
|
|||||||
MdnsPointerRecord(
|
MdnsPointerRecord(
|
||||||
arrayOf("_testservice", "_tcp", "local"),
|
arrayOf("_testservice", "_tcp", "local"),
|
||||||
0L /* receiptTimeMillis */,
|
0L /* receiptTimeMillis */,
|
||||||
true /* cacheFlush */,
|
false /* cacheFlush */,
|
||||||
0L /* ttlMillis */,
|
0L /* ttlMillis */,
|
||||||
arrayOf("MyTestService", "_testservice", "_tcp", "local"))
|
arrayOf("MyTestService", "_testservice", "_tcp", "local"))
|
||||||
), packet.answers)
|
), packet.answers)
|
||||||
@@ -211,13 +211,13 @@ class MdnsRecordRepositoryTest {
|
|||||||
MdnsPointerRecord(
|
MdnsPointerRecord(
|
||||||
arrayOf("_testservice", "_tcp", "local"),
|
arrayOf("_testservice", "_tcp", "local"),
|
||||||
0L /* receiptTimeMillis */,
|
0L /* receiptTimeMillis */,
|
||||||
true /* cacheFlush */,
|
false /* cacheFlush */,
|
||||||
0L /* ttlMillis */,
|
0L /* ttlMillis */,
|
||||||
arrayOf("MyTestService", "_testservice", "_tcp", "local")),
|
arrayOf("MyTestService", "_testservice", "_tcp", "local")),
|
||||||
MdnsPointerRecord(
|
MdnsPointerRecord(
|
||||||
arrayOf("_subtype", "_sub", "_testservice", "_tcp", "local"),
|
arrayOf("_subtype", "_sub", "_testservice", "_tcp", "local"),
|
||||||
0L /* receiptTimeMillis */,
|
0L /* receiptTimeMillis */,
|
||||||
true /* cacheFlush */,
|
false /* cacheFlush */,
|
||||||
0L /* ttlMillis */,
|
0L /* ttlMillis */,
|
||||||
arrayOf("MyTestService", "_testservice", "_tcp", "local")),
|
arrayOf("MyTestService", "_testservice", "_tcp", "local")),
|
||||||
), packet.answers)
|
), packet.answers)
|
||||||
|
|||||||
Reference in New Issue
Block a user