BIND 10 trac1062, updated. 414b25d4bfa89e0609cd3c8c3a6e610681f4c929 [1062] Merge branch 'trac1062' of ssh://git.bind10.isc.org/var/bind10/git/bind10 into trac1062

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Aug 11 19:35:52 UTC 2011


The branch, trac1062 has been updated
       via  414b25d4bfa89e0609cd3c8c3a6e610681f4c929 (commit)
       via  f57e8133a7af31a59578ac2cd50dd20418cb8fbc (commit)
       via  774a56a8beeef3a73258910b12cace20443a1bcb (commit)
      from  85a14b1daffb3a20e9e510b73d25c71ba95cc350 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 414b25d4bfa89e0609cd3c8c3a6e610681f4c929
Merge: f57e813 85a14b1
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Aug 11 12:35:33 2011 -0700

    [1062] Merge branch 'trac1062' of ssh://git.bind10.isc.org/var/bind10/git/bind10 into trac1062

commit f57e8133a7af31a59578ac2cd50dd20418cb8fbc
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Aug 11 12:35:07 2011 -0700

    [1062] style fix: check NULL explicitly.

commit 774a56a8beeef3a73258910b12cace20443a1bcb
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Aug 11 12:14:55 2011 -0700

    [1062] editorial/documentation proposed updates

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/database.h                 |    5 ++++-
 src/lib/datasrc/sqlite3_connection.cc      |    2 +-
 src/lib/datasrc/sqlite3_connection.h       |    7 ++++++-
 src/lib/datasrc/tests/database_unittest.cc |    2 +-
 4 files changed, 12 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/database.h b/src/lib/datasrc/database.h
index 4a28b7c..fc4057a 100644
--- a/src/lib/datasrc/database.h
+++ b/src/lib/datasrc/database.h
@@ -151,11 +151,14 @@ public:
     /**
         * \brief Returns a string identifying this dabase backend
         *
+        * The returned string is mainly intended to be used for
+        * debugging/logging purposes.
+        *
         * Any implementation is free to choose the exact string content,
         * but it is advisable to make it a name that is distinguishable
         * from the others.
         *
-        * \return the name of the dabase
+        * \return the name of the database
         */
     virtual const std::string& getDBName() const = 0;
 };
diff --git a/src/lib/datasrc/sqlite3_connection.cc b/src/lib/datasrc/sqlite3_connection.cc
index 4fd4800..4a90b71 100644
--- a/src/lib/datasrc/sqlite3_connection.cc
+++ b/src/lib/datasrc/sqlite3_connection.cc
@@ -354,7 +354,7 @@ convertToPlainChar(const unsigned char* ucp,
         // The field can really be NULL, in which case we return an
         // empty string, or sqlite may have run out of memory, in
         // which case we raise an error
-        if (dbparameters &&
+        if (dbparameters != NULL &&
             sqlite3_errcode(dbparameters->db_) == SQLITE_NOMEM) {
             isc_throw(DataSourceError,
                       "Sqlite3 backend encountered a memory allocation "
diff --git a/src/lib/datasrc/sqlite3_connection.h b/src/lib/datasrc/sqlite3_connection.h
index 8c38b8a..edfa37f 100644
--- a/src/lib/datasrc/sqlite3_connection.h
+++ b/src/lib/datasrc/sqlite3_connection.h
@@ -135,7 +135,12 @@ public:
      */
     virtual void resetSearch();
 
-    virtual const std::string& getDBName() const { return database_name_; }
+    /// The SQLite3 implementation of this method returns a string starting
+    /// with a fixed prefix of "sqlite3_" followed by the DB file name
+    /// removing any path name.  For example, for the DB file
+    /// /somewhere/in/the/system/bind10.sqlite3, this method will return
+    /// "sqlite3_bind10.sqlite3".
+    virtual const std::string& getDBName() const { return (database_name_); }
 
 private:
     /// \brief Private database data
diff --git a/src/lib/datasrc/tests/database_unittest.cc b/src/lib/datasrc/tests/database_unittest.cc
index 609ab6a..d0ab1a0 100644
--- a/src/lib/datasrc/tests/database_unittest.cc
+++ b/src/lib/datasrc/tests/database_unittest.cc
@@ -116,7 +116,7 @@ public:
     }
 
     virtual const std::string& getDBName() const {
-        return database_name_;
+        return (database_name_);
     }
 private:
     std::map<std::string, std::vector< std::vector<std::string> > > records;




More information about the bind10-changes mailing list