Parcourir la source

data_ is an array
delete dns_service in the main.cc of recurse and auth
made coroutine destructor virtual


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac394@3369 e5f2f494-b856-4b98-b285-d166d9295462

Jelte Jansen il y a 14 ans
Parent
commit
45842779ed

+ 2 - 0
src/bin/auth/main.cc

@@ -240,6 +240,8 @@ main(int argc, char* argv[]) {
 
         cout << "[b10-auth] Server started." << endl;
         io_service.run();
+
+        delete dns_service;
     } catch (const std::exception& ex) {
         cerr << "[b10-auth] Server failed: " << ex.what() << endl;
         ret = 1;

+ 1 - 1
src/bin/recurse/main.cc

@@ -169,7 +169,6 @@ main(int argc, char* argv[]) {
 
     int ret = 0;
 
-    // XXX: we should eventually pass io_service here.
     Session* cc_session = NULL;
     ModuleCCSession* config_session = NULL;
     try {
@@ -224,6 +223,7 @@ main(int argc, char* argv[]) {
 
         cout << "[b10-recurse] Server started." << endl;
         io_service.run();
+        delete dns_service;
     } catch (const std::exception& ex) {
         cerr << "[b10-recurse] Server failed: " << ex.what() << endl;
         ret = 1;

+ 1 - 0
src/lib/asiolink/internal/coroutine.h

@@ -67,6 +67,7 @@ class coroutine
 {
 public:
   coroutine() : value_(0) {}
+  virtual ~coroutine() {}
   bool is_child() const { return value_ < 0; }
   bool is_parent() const { return !is_child(); }
   bool is_complete() const { return value_ == -1; }

+ 1 - 1
src/lib/asiolink/internal/udpdns.h

@@ -162,7 +162,7 @@ private:
     isc::dns::OutputBufferPtr respbuf_;
     
     // The buffer into which the query packet is written
-    boost::shared_ptr<char> data_;
+    boost::shared_array<char> data_;
 
     // State information that is entirely internal to a given instance
     // of the coroutine can be declared here.