* companion: new pref: path_hash_mode (0..2)

* companion: new field in CMD_SET_OTHER_PARAMS, path_hash_mode
* companion: CMD_SEND_SELF_ADVERT, cmd_frame[1] now holds the path hash size (0 = zero hop, 1..3 = flood path hash size)
This commit is contained in:
Scott Powell 2026-02-23 18:26:56 +11:00
parent a66773bac0
commit e52d57c065
4 changed files with 18 additions and 9 deletions

View file

@ -74,7 +74,8 @@ void MyMesh::pushPostToClient(ClientInfo *client, PostInfo &post) {
auto reply = createDatagram(PAYLOAD_TYPE_TXT_MSG, client->id, client->shared_secret, reply_data, len);
if (reply) {
if (client->out_path_len == OUT_PATH_UNKNOWN) {
sendFlood(reply); // TODO: which path_hash_size to use?
unsigned long delay_millis = 0;
sendFlood(reply, delay_millis, _prefs.path_hash_mode);
client->extra.room.ack_timeout = futureMillis(PUSH_ACK_TIMEOUT_FLOOD);
} else {
sendDirect(reply, client->out_path, client->out_path_len);