Skip to content

Commit

Permalink
add debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
keepsimple1 committed Jun 16, 2024
1 parent cef532f commit 1fffc80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/service_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1377,14 +1377,15 @@ impl Zeroconf {

/// Sends out a list of `questions` (i.e. DNS questions) via multicast.
fn send_query_vec(&self, questions: &[(&str, u16)]) {
debug!("Sending multicast queries: {:?}", questions);
debug!("Sending query questions: {:?}", questions);
let mut out = DnsOutgoing::new(FLAGS_QR_QUERY);
let now = current_time_millis();

for (name, qtype) in questions {
out.add_question(name, *qtype);

for record in self.cache.get_known_answers(name, *qtype, now) {
debug!("add known answer: {:?}", record);
let mut new_record = record.clone();
new_record.get_record_mut().update_ttl(now);
out.add_additional_answer_box(new_record);
Expand Down

0 comments on commit 1fffc80

Please sign in to comment.