Browse Source

[3152] Minor changes to message/comment text

Also added spaces around some operators.
Stephen Morris 11 years ago
parent
commit
988ee2ace6
3 changed files with 30 additions and 29 deletions
  1. 21 19
      src/bin/dhcp6/dhcp6_messages.mes
  2. 6 7
      src/bin/dhcp6/dhcp6_srv.cc
  3. 3 3
      src/bin/dhcp6/dhcp6_srv.h

+ 21 - 19
src/bin/dhcp6/dhcp6_messages.mes

@@ -179,35 +179,37 @@ advertised servers and continue allocation with that server. This
 is a normal behavior and indicates successful operation.
 
 % DHCP6_LEASE_ADVERT_FAIL failed to advertise an address lease for client duid=%1, iaid=%2
-This message indicates that the server failed to advertise (in response to
-received SOLICIT) a non-temporary lease for a given client. There may be many
-reasons for such failure. Each specific failure is logged in a separate log entry.
+This message indicates that in response to a received SOLICIT, the server
+failed to advertise a non-temporary lease for a given client. There may
+be many reasons for such failure. Each failure is logged in a separate
+log entry.
 
 % DHCP6_PD_LEASE_ADVERT_FAIL failed to advertise a prefix lease for client duid=%1, iaid=%2
-This message indicates that the server failed to advertise (in response to
-received SOLICIT) a prefix lease for a given client. There may be many reasons
-for such failure. Each specific failure is logged in a separate log entry.
+This message indicates that in response to a received SOLICIT, the
+server failed to advertise a prefix lease for the client. There may
+be many reasons for such failure. Each failure is logged in a separate
+log entry.
 
 % DHCP6_LEASE_ALLOC address lease %1 has been allocated (client duid=%2, iaid=%3)
-This debug message indicates that the server successfully granted (in
-response to client's REQUEST message) an non-temporary address lease. This is a
-normal behavior and indicates successful operation.
+This debug message indicates that in response to a client's REQUEST
+message, the server successfully granted an non-temporary address
+lease. This is a normal behavior and indicates successful operation.
 
 % DHCP6_PD_LEASE_ALLOC prefix lease %1/%2 has been allocated (client duid=%3, iaid=%4)
-This debug message indicates that the server successfully granted (in response
-to client's REQUEST message) an prefix delegation lease. This is a normal
-behavior and indicates successful operation.
+This debug message indicates that in response to a client's REQUEST
+message, the server successfully granted a prefix delegation lease. This
+is a normal behavior and indicates successful operation.
 
 % DHCP6_LEASE_ALLOC_FAIL failed to grant an address lease for client duid=%1, iaid=%2
-This message indicates that the server failed to grant (in response to
-received REQUEST) a non-temporary address lease for a given client. There may be
-many reasons for such failure. Each specific failure is logged in a separate
+This message indicates that in response to a received REQUEST, the server
+failed to grant a non-temporary address lease for the client. There may
+be many reasons for such failure. Each failure is logged in a separate
 log entry.
 
 % DHCP6_PD_LEASE_ALLOC_FAIL failed to grant a prefix lease for client duid=%1, iaid=%2
 This message indicates that the server failed to grant (in response to
 received REQUEST) a prefix lease for a given client. There may be many reasons
-for such failure. Each specific failure is logged in a separate log entry.
+for such failure. Each failure is logged in a separate log entry.
 
 % DHCP6_LEASE_WITHOUT_DUID lease for address %1 does not have a DUID
 This error message indicates a database consistency failure. The lease
@@ -300,9 +302,9 @@ parsing actions and committal of changes failed.  The reason for the
 failure is given in the message.
 
 % DHCP6_PROCESS_IA_NA_REQUEST server is processing IA_NA option (duid=%1, iaid=%2, hint=%3)
-This is a debug message that indicates a processing of received IA_NA
-option. It may optionally contain an address that may be used by the server
-as a hint for possible requested address.
+This is a debug message that indicates the processing of a received
+IA_NA option. It may optionally contain an address that may be used by
+the server as a hint for possible requested address.
 
 % DHCP6_PROCESS_IA_PD_REQUEST server is processing IA_PD option (duid=%1, iaid=%2, hint=%3)
 This is a debug message that indicates a processing of received IA_PD

+ 6 - 7
src/bin/dhcp6/dhcp6_srv.cc

@@ -817,7 +817,6 @@ Dhcpv6Srv::assignLeases(const Pkt6Ptr& question, Pkt6Ptr& answer,
     // We need to allocate addresses for all IA_NA options in the client's
     // question (i.e. SOLICIT or REQUEST) message.
     // @todo add support for IA_TA
-    // @todo add support for IA_PD
 
     // We need to select a subnet the client is connected in.
     Subnet6Ptr subnet = selectSubnet(question);
@@ -1343,8 +1342,8 @@ Dhcpv6Srv::assignIA_PD(const Subnet6Ptr& subnet, const DuidPtr& duid,
     }
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, DHCP6_PROCESS_IA_PD_REQUEST)
-        .arg(duid?duid->toText():"(no-duid)").arg(ia->getIAID())
-        .arg(hintOpt?hint.toText():"(no hint)");
+        .arg(duid ? duid->toText() : "(no-duid)").arg(ia->getIAID())
+        .arg(hintOpt ? hint.toText() : "(no hint)");
 
     // "Fake" allocation is processing of SOLICIT message. We pretend to do an
     // allocation, but we do not put the lease in the database. That is ok,
@@ -1387,11 +1386,11 @@ Dhcpv6Srv::assignIA_PD(const Subnet6Ptr& subnet, const DuidPtr& duid,
 
             // We have a lease! Let's wrap its content into IA_PD option
             // with IAADDR suboption.
-            LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, fake_allocation?
-                      DHCP6_PD_LEASE_ADVERT:DHCP6_PD_LEASE_ALLOC)
+            LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, fake_allocation ?
+                      DHCP6_PD_LEASE_ADVERT : DHCP6_PD_LEASE_ALLOC)
                 .arg((*l)->addr_.toText())
                 .arg(static_cast<int>((*l)->prefixlen_))
-                .arg(duid?duid->toText():"(no-duid)")
+                .arg(duid ? duid->toText() : "(no-duid)")
                 .arg(ia->getIAID());
 
             boost::shared_ptr<Option6IAPrefix>
@@ -1412,7 +1411,7 @@ Dhcpv6Srv::assignIA_PD(const Subnet6Ptr& subnet, const DuidPtr& duid,
 
         LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, fake_allocation ?
                   DHCP6_PD_LEASE_ADVERT_FAIL : DHCP6_PD_LEASE_ALLOC_FAIL)
-            .arg(duid?duid->toText():"(no-duid)")
+            .arg(duid ? duid->toText() : "(no-duid)")
             .arg(ia->getIAID());
 
         ia_rsp->addOption(createStatusCode(STATUS_NoPrefixAvail,

+ 3 - 3
src/bin/dhcp6/dhcp6_srv.h

@@ -227,9 +227,9 @@ protected:
     /// @brief Processes IA_PD option (and assigns prefixes if necessary).
     ///
     /// Generates response to IA_PD. This typically includes selecting (and
-    /// allocating a lease in case of REQUEST) a prefix lease and creating
-    /// IAPREFIX option. In case of allocation failure, it may contain
-    /// status code option with non-zero status, denoting cause of the
+    /// allocating in the case of REQUEST) a prefix lease and creating an
+    /// IAPREFIX option. In case of an allocation failure, it may contain a
+    /// status code option with non-zero status denoting the cause of the
     /// allocation failure.
     ///
     /// @param subnet subnet the client is connected to