Parcourir la source

[3089] Added ticket number to commentary

Added todo to dns_client.cc commentary regarding
trac# 3286 and the behavior isc::dns::Message::fromWire.
Thomas Markwalder il y a 11 ans
Parent
commit
9934a46fea
2 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. 4 2
      src/bin/d2/dns_client.cc
  2. 4 0
      src/bin/d2/tests/nc_test_utils.h

+ 4 - 2
src/bin/d2/dns_client.cc

@@ -50,8 +50,10 @@ public:
     // once in the lifetime of a Message instance.  Therefore, response_ is a
     // once in the lifetime of a Message instance.  Therefore, response_ is a
     // pointer reference thus allowing this class to replace the object
     // pointer reference thus allowing this class to replace the object
     // pointed to with a new Message instance each time a message is
     // pointed to with a new Message instance each time a message is
-    // received. This allows a single DNSClientImpl instance to be used in
-    // for multiple, sequential IOFetch calls.
+    // received. This allows a single DNSClientImpl instance to be used for
+    // multiple, sequential IOFetch calls. (@todo Trac# 3286 has been opened
+    // against dns::Message::fromWire.  Should the behavior of fromWire change
+    // the behavior here with could be rexamined).
     D2UpdateMessagePtr& response_;
     D2UpdateMessagePtr& response_;
     // A caller-supplied external callback which is invoked when DNS message
     // A caller-supplied external callback which is invoked when DNS message
     // exchange is complete or interrupted.
     // exchange is complete or interrupted.

+ 4 - 0
src/bin/d2/tests/nc_test_utils.h

@@ -358,6 +358,10 @@ extern void addDomainServer(DdnsDomainPtr& domain, const std::string& name,
 
 
 /// @brief Creates a hex text dump of the given data buffer.
 /// @brief Creates a hex text dump of the given data buffer.
 ///
 ///
+/// This method is not used for testing but is handy for debugging.  It creates
+/// a pleasantly formatted string of 2-digits per byte separated by spaces with
+/// 16 bytes per line.
+///
 /// @param data pointer to the data to dump
 /// @param data pointer to the data to dump
 /// @param len size (in bytes) of data
 /// @param len size (in bytes) of data
 extern std::string toHexText(const uint8_t* data, size_t len);
 extern std::string toHexText(const uint8_t* data, size_t len);