Browse Source

[805] recovered missing condition check; a minor style fix (folded a long line)

JINMEI Tatuya 13 years ago
parent
commit
3fcadc1a85
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/lib/asiodns/udp_server.cc

+ 3 - 3
src/lib/asiodns/udp_server.cc

@@ -88,10 +88,10 @@ struct UDPServer::Data {
         LOG_DEBUG(logger, DBGLVL_TRACE_BASIC, ASIODNS_FD_ADD_UDP).arg(fd);
         try {
             socket_.reset(new udp::socket(io_service));
-            socket_->assign(AF_INET6 ? udp::v6() : udp::v4(), fd);
+            socket_->assign(af == AF_INET6 ? udp::v6() : udp::v4(), fd);
         } catch (const std::exception& exception) {
-            // Whatever the thing throws, it is something from ASIO and we convert
-            // it
+            // Whatever the thing throws, it is something from ASIO and we
+            // convert it
             isc_throw(IOError, exception.what());
         }
     }