diff options
author | noamsml@chromium.org <noamsml@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 09:00:40 +0000 |
---|---|---|
committer | noamsml@chromium.org <noamsml@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 09:00:40 +0000 |
commit | b18498d8895b8c86b7e9d2b5a08a360639b920f8 (patch) | |
tree | 667c7bec61a2664778ed9d6cae86b822f667d7c6 /cloud_print/gcp20/prototype/dns_sd_server.cc | |
parent | 269c2e84b46cb72986f60775efbfd5022fc75c9d (diff) | |
download | chromium_src-b18498d8895b8c86b7e9d2b5a08a360639b920f8.zip chromium_src-b18498d8895b8c86b7e9d2b5a08a360639b920f8.tar.gz chromium_src-b18498d8895b8c86b7e9d2b5a08a360639b920f8.tar.bz2 |
Make gcp20_device respond to _printer._sub._privet.local queries
Make the GCP2.0 prototype respond to printer subtype queries and announce itself
using the printer subtype record.
BUG=
Review URL: https://codereview.chromium.org/52113004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/gcp20/prototype/dns_sd_server.cc')
-rw-r--r-- | cloud_print/gcp20/prototype/dns_sd_server.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cloud_print/gcp20/prototype/dns_sd_server.cc b/cloud_print/gcp20/prototype/dns_sd_server.cc index 4ef9bb3..66df9e6 100644 --- a/cloud_print/gcp20/prototype/dns_sd_server.cc +++ b/cloud_print/gcp20/prototype/dns_sd_server.cc @@ -200,11 +200,13 @@ void DnsSdServer::ProccessQuery(uint32 current_ttl, const DnsQueryRecord& query, // TODO(maksymb): Add IPv6 support. case net::dns_protocol::kTypePTR: log = "Processing PTR query"; - if (query.qname == serv_params_.service_type_) { - builder->AppendPtr(serv_params_.service_type_, current_ttl, + if (query.qname == serv_params_.service_type_ || + query.qname == serv_params_.secondary_service_type_) { + builder->AppendPtr(query.qname, current_ttl, serv_params_.service_name_); responded = true; } + break; case net::dns_protocol::kTypeSRV: log = "Processing SRV query"; @@ -260,6 +262,8 @@ void DnsSdServer::SendAnnouncement(uint32 ttl) { builder.AppendPtr(serv_params_.service_type_, ttl, serv_params_.service_name_); + builder.AppendPtr(serv_params_.secondary_service_type_, ttl, + serv_params_.service_name_); builder.AppendSrv(serv_params_.service_name_, ttl, kSrvPriority, kSrvWeight, serv_params_.http_port_, serv_params_.service_domain_name_); @@ -296,4 +300,3 @@ uint32 DnsSdServer::GetCurrentTLL() const { } return current_ttl; } - |