Browse Source

[3080] Fixed a couple of typos and errors in doxygen.

Marcin Siodelski 11 years ago
parent
commit
08def0873c
2 changed files with 17 additions and 10 deletions
  1. 2 2
      src/lib/dhcpsrv/dhcpsrv_messages.mes
  2. 15 8
      src/lib/dhcpsrv/pgsql_lease_mgr.cc

+ 2 - 2
src/lib/dhcpsrv/dhcpsrv_messages.mes

@@ -384,9 +384,9 @@ A debug message issued when the server is about to add an IPv6 lease
 with the specified address to the PostgreSQL backend database.
 with the specified address to the PostgreSQL backend database.
 
 
 % DHCPSRV_PGSQL_DEALLOC_ERROR An error occured deallocating SQL statements while closing the PostgreSQL lease database: %1
 % DHCPSRV_PGSQL_DEALLOC_ERROR An error occured deallocating SQL statements while closing the PostgreSQL lease database: %1
-This is an error message issued when a DHCP server (either V4 or V6) exprienced
+This is an error message issued when a DHCP server (either V4 or V6) experienced
 and error freeing database SQL resources as part of closing its connection to
 and error freeing database SQL resources as part of closing its connection to
- the Postgresql database.  The connection is closed as part of normal server
+the Postgresql database.  The connection is closed as part of normal server
 shutdown.  This error is most likely a programmatic issue that is highly
 shutdown.  This error is most likely a programmatic issue that is highly
 unlikely to occur or negatively impact server operation.
 unlikely to occur or negatively impact server operation.
 
 

+ 15 - 8
src/lib/dhcpsrv/pgsql_lease_mgr.cc

@@ -34,10 +34,10 @@ using namespace std;
 
 
 namespace {
 namespace {
 
 
-// Maximum number of parameters used in any signle query
+// Maximum number of parameters used in any single query
 const size_t MAX_PARAMETERS_IN_QUERY = 13;
 const size_t MAX_PARAMETERS_IN_QUERY = 13;
 
 
-// Defines a single query
+/// @brief  Defines a single query
 struct TaggedStatement {
 struct TaggedStatement {
 
 
     /// Query index
     /// Query index
@@ -175,7 +175,7 @@ namespace dhcp {
 class PgSqlLeaseExchange {
 class PgSqlLeaseExchange {
 protected:
 protected:
 
 
-    /// Converts time_t structure to a text representation in local time.
+    /// @brief Converts time_t structure to a text representation in local time.
     ///
     ///
     /// The format of the output string is "%Y-%m-%d %H:%M:%S".  Database
     /// The format of the output string is "%Y-%m-%d %H:%M:%S".  Database
     /// table columns using this value should be typed as TIMESTAMP WITH
     /// table columns using this value should be typed as TIMESTAMP WITH
@@ -195,10 +195,12 @@ protected:
         return (std::string(buffer));
         return (std::string(buffer));
     }
     }
 
 
-    /// Converts time stamp from the database to a time_t
+    /// @brief Converts time stamp from the database to a time_t
+    ///
     /// @param db_time_val timestamp to be converted.  This value
     /// @param db_time_val timestamp to be converted.  This value
     /// is expected to be the number of seconds since the epoch
     /// is expected to be the number of seconds since the epoch
     /// expressed as base-10 integer string.
     /// expressed as base-10 integer string.
+    /// @return Converted timestamp as time_t value.
     time_t convertFromDatabaseTime(const std::string& db_time_val) {
     time_t convertFromDatabaseTime(const std::string& db_time_val) {
         // Convert string time value to time_t
         // Convert string time value to time_t
         try  {
         try  {
@@ -209,7 +211,7 @@ protected:
         }
         }
     }
     }
 
 
-    /// Converts Postgres text boolean representations to bool
+    /// @brief Converts Postgres text boolean representations to bool
     ///
     ///
     /// Allowed values are "t" or "f", or "" which is false.
     /// Allowed values are "t" or "f", or "" which is false.
     //  Any other will throw.
     //  Any other will throw.
@@ -236,10 +238,13 @@ protected:
 
 
 /// @brief Represents a single Lease4 exchange
 /// @brief Represents a single Lease4 exchange
 class PgSqlLease4Exchange : public PgSqlLeaseExchange {
 class PgSqlLease4Exchange : public PgSqlLeaseExchange {
+private:
+    /// @brief Number of columns in the table holding DHCPv4 leases.
     static const size_t LEASE_COLUMNS = 9;
     static const size_t LEASE_COLUMNS = 9;
+
 public:
 public:
 
 
-    /// Default constructor
+    /// @brief Default constructor
     PgSqlLease4Exchange() : addr4_(0), hwaddr_length_(0), client_id_length_(0) {
     PgSqlLease4Exchange() : addr4_(0), hwaddr_length_(0), client_id_length_(0) {
         memset(hwaddr_buffer_, 0, sizeof(hwaddr_buffer_));
         memset(hwaddr_buffer_, 0, sizeof(hwaddr_buffer_));
         memset(client_id_buffer_, 0, sizeof(client_id_buffer_));
         memset(client_id_buffer_, 0, sizeof(client_id_buffer_));
@@ -378,7 +383,9 @@ private:
 };
 };
 
 
 class PgSqlLease6Exchange : public PgSqlLeaseExchange {
 class PgSqlLease6Exchange : public PgSqlLeaseExchange {
+private:
     static const size_t LEASE_COLUMNS = 12;
     static const size_t LEASE_COLUMNS = 12;
+
 public:
 public:
     PgSqlLease6Exchange() : duid_length_(0) {
     PgSqlLease6Exchange() : duid_length_(0) {
         memset(duid_buffer_, 0, sizeof(duid_buffer_));
         memset(duid_buffer_, 0, sizeof(duid_buffer_));
@@ -644,8 +651,8 @@ PgSqlLeaseMgr::openDatabase() {
         sname= getParameter("name");
         sname= getParameter("name");
         dbconnparameters += " dbname = '" + sname + "'";
         dbconnparameters += " dbname = '" + sname + "'";
     } catch(...) {
     } catch(...) {
-        // No database name.  Throw a "NoName" exception
-        isc_throw(NoDatabaseName, "must specified a name for the database");
+        // No database name.  Throw a "NoDatabaseName" exception
+        isc_throw(NoDatabaseName, "must specify a name for the database");
     }
     }
 
 
     conn_ = PQconnectdb(dbconnparameters.c_str());
     conn_ = PQconnectdb(dbconnparameters.c_str());