diff options
author | Vitaly Buka <vitalybuka@google.com> | 2016-03-09 14:49:56 -0800 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2016-03-10 00:44:50 +0000 |
commit | cd7a3a2d4bc87d5c39648f1ebba0b5cfa63f547f (patch) | |
tree | 20e2331fb04df088a47632764d7f6f67a5ff966e | |
parent | 5ddd991fa692c7a32eb0097017abaa452a1844b4 (diff) | |
download | libweave-cd7a3a2d4bc87d5c39648f1ebba0b5cfa63f547f.tar.gz |
Add HTTPS port into TXT record
Example: https=123
BUG: 26687064
Change-Id: I8ebba527102eec2f916e6e9239ba07d026de7b7e
Reviewed-on: https://weave-review.googlesource.com/2889
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
-rw-r--r-- | src/privet/publisher.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/privet/publisher.cc b/src/privet/publisher.cc index 55c9fe4..db26b26 100644 --- a/src/privet/publisher.cc +++ b/src/privet/publisher.cc @@ -65,6 +65,10 @@ void Publisher::ExposeService() { {"flags=" + WifiSsidGenerator{cloud_, wifi_}.GenerateFlags()}, }; + if (device_->GetHttpsEnpoint().first > 0) + txt_record.emplace_back("https=" + + std::to_string(device_->GetHttpsEnpoint().first)); + if (!cloud_->GetCloudId().empty()) txt_record.emplace_back("gcd_id=" + cloud_->GetCloudId()); |