@@ -25,7 +25,8 @@ udp_server::udp_server(const stream_info_impl_p &info, io_context &io, udp proto
2525 info_->v4service_port (port);
2626 else
2727 info_->v6service_port (port);
28- LOG_F (2 , " %s: Started unicast udp server %p at port %d" , info_->name ().c_str (), this , port);
28+ LOG_F (2 , " %s: Started unicast udp server at port %d (addr %p)" , info_->name ().c_str (), port,
29+ (void *)this );
2930}
3031
3132udp_server::udp_server (const stream_info_impl_p &info, io_context &io, const std::string &address,
@@ -67,8 +68,8 @@ udp_server::udp_server(const stream_info_impl_p &info, io_context &io, const std
6768 else
6869 socket_->set_option (ip::multicast::join_group (addr));
6970 }
70- LOG_F (2 , " %s: Started multicast udp server at %s port %d" , this -> info_ -> name (). c_str () ,
71- address.c_str (), port);
71+ LOG_F (2 , " %s: Started multicast udp server at %s port %d (addr %p) " ,
72+ this -> info_ -> name (). c_str (), address.c_str (), port, ( void *) this );
7273}
7374
7475// === externally issued asynchronous commands ===
@@ -123,8 +124,12 @@ void udp_server::handle_receive_outcome(error_code err, std::size_t len) {
123124 request_stream >> return_port;
124125 std::string query_id;
125126 request_stream >> query_id;
127+ DLOG_F (2 , " %p shortinfo req from %s for %s" , (void *)this ,
128+ remote_endpoint_.address ().to_string ().c_str (), query.c_str ());
126129 // check query
127130 if (info_->matches_query (query)) {
131+ LOG_F (
132+ 3 , " %p query matches, replying to port %d" , (void *)this , return_port);
128133 // query matches: send back reply
129134 udp::endpoint return_endpoint (remote_endpoint_.address (), return_port);
130135 string_p replymsg (
@@ -136,8 +141,7 @@ void udp_server::handle_receive_outcome(error_code err, std::size_t len) {
136141 });
137142 return ;
138143 } else {
139- DLOG_F (INFO, " %p Got shortinfo query for mismatching query string: %s" , this ,
140- query.c_str ());
144+ DLOG_F (2 , " %p query didn't match" , (void *)this );
141145 }
142146 } else if (time_services_enabled_ && method == " LSL:timedata" ) {
143147 // timedata request: parse time of original transmission
@@ -158,11 +162,13 @@ void udp_server::handle_receive_outcome(error_code err, std::size_t len) {
158162 });
159163 return ;
160164 } else {
161- DLOG_F (INFO, " Unknown method '%s' received by udp-server" , method.c_str ());
165+ DLOG_F (INFO, " %p Unknown method '%s' received by udp-server" , (void *)this ,
166+ method.c_str ());
162167 }
163168 }
164169 } catch (std::exception &e) {
165- LOG_F (WARNING, " udp_server: hiccup during request processing: %s" , e.what ());
170+ LOG_F (WARNING, " %p udp_server: hiccup during request processing: %s" , (void *)this ,
171+ e.what ());
166172 }
167173 request_next_packet ();
168174 }
0 commit comments