| 363 | } |
| 364 | |
| 365 | static uint16_t NameWireLength(const char* name) |
| 366 | { |
| 367 | uint16_t size = 1; |
| 368 | const char* cursor = name; |
| 369 | while (*cursor) |
| 370 | { |
| 371 | uint16_t label_len = 0; |
| 372 | while (*cursor && *cursor != '.') |
| 373 | { |
| 374 | char decoded = 0; |
| 375 | if (!DecodeEscapedChar(&cursor, &decoded)) |
| 376 | return 0; |
| 377 | ++label_len; |
| 378 | } |
| 379 | size += 1 + label_len; |
| 380 | if (*cursor == '.') |
| 381 | ++cursor; |
| 382 | } |
| 383 | return size; |
| 384 | } |
| 385 | |
| 386 | static bool GetExpectedAdvertisedAddress(dmSocket::Address* out) |
| 387 | { |
no test coverage detected