]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] spelling
authorFrancis Dupont <fdupont@isc.org>
Sat, 14 Mar 2015 19:11:23 +0000 (20:11 +0100)
committerFrancis Dupont <fdupont@isc.org>
Sat, 14 Mar 2015 19:11:23 +0000 (20:11 +0100)
13 files changed:
src/lib/hooks/callout_manager.h
src/lib/hooks/hooks_component_developer.dox
src/lib/hooks/hooks_maintenance.dox
src/lib/hooks/hooks_manager.h
src/lib/hooks/hooks_user.dox
src/lib/hooks/library_handle.h
src/lib/hooks/server_hooks.cc
src/lib/hooks/tests/callout_manager_unittest.cc
src/lib/hooks/tests/common_test_class.h
src/lib/hooks/tests/full_callout_library.cc
src/lib/hooks/tests/hooks_manager_unittest.cc
src/lib/hooks/tests/library_manager_collection_unittest.cc
src/lib/hooks/tests/library_manager_unittest.cc

index 2ddf4181a8e508b747f58efd3098cd78875e874b..ea6f34e99d2bfef25ba9ba0afce6213846a7720f 100644 (file)
@@ -87,7 +87,7 @@ public:
 /// Indexes range between 1 and n (where n is the number of the libraries
 /// loaded) and are assigned to libraries based on the order the libraries
 /// presented to the hooks framework for loading (something that occurs in the
-/// isc::util::HooksManager) class.  However, two other indexes are recognised,
+/// isc::util::HooksManager) class.  However, two other indexes are recognized,
 /// 0 and INT_MAX.  These are used when the server itself registers callouts -
 /// the server is able to register callouts that get called before any
 /// user-library callouts, and ones that get called after user-library callouts.
@@ -95,7 +95,7 @@ public:
 /// C2 as before, and that the server registers S1 (to run before the
 /// user-registered callouts) and S2 (to run after them), the callouts are
 /// stored (and executed) in the order S1, A1, A2, B1, B2, B3, C2, C2, S2.  In
-/// summary, the recognised index values are:
+/// summary, the recognized index values are:
 ///
 /// - < 0: invalid.
 /// - 0: used for server-registered callouts that are called before
@@ -145,7 +145,7 @@ public:
     /// @param name Name of the hook to which the callout is added.
     /// @param callout Pointer to the callout function to be registered.
     ///
-    /// @throw NoSuchHook The hook name is unrecognised.
+    /// @throw NoSuchHook The hook name is unrecognized.
     /// @throw Unexpected The hook name is valid but an internal data structure
     ///        is of the wrong size.
     void registerCallout(const std::string& name, CalloutPtr callout);
@@ -162,7 +162,7 @@ public:
     ///
     /// @return true if a one or more callouts were deregistered.
     ///
-    /// @throw NoSuchHook The hook name is unrecognised.
+    /// @throw NoSuchHook The hook name is unrecognized.
     /// @throw Unexpected The hook name is valid but an internal data structure
     ///        is of the wrong size.
     bool deregisterCallout(const std::string& name, CalloutPtr callout);
@@ -177,7 +177,7 @@ public:
     ///
     /// @return true if one or more callouts were deregistered.
     ///
-    /// @throw NoSuchHook Thrown if the hook name is unrecognised.
+    /// @throw NoSuchHook Thrown if the hook name is unrecognized.
     bool deregisterAllCallouts(const std::string& name);
 
     /// @brief Checks if callouts are present on a hook
index ef469a44cfa1195b87ccd35c2bf145c555a420dc..164a368bd46be869bd3582990d7f6bff4c4d40e0 100644 (file)
@@ -39,7 +39,7 @@ In the remainder of this guide, the following terminology is used:
 
 - Component - a Kea process, e.g. the DHCPv4 or DHCPv6 server.
 
-- Hook/Hook Point - used interchageably, this is a point in the code at
+- Hook/Hook Point - used interchangeably, this is a point in the code at
 which a call to user-written functions is made. Each hook has a name and
 each hook can have any number (including 0) of user-written functions
 attached to it.
@@ -86,7 +86,7 @@ component.
 
 The following sections will describe these tasks in more detail.
 
-@section hooksComponentDefinition Determing the Hook Points
+@section hooksComponentDefinition Determining the Hook Points
 
 Before any other action takes place, the location of the hook points
 in the code need to be determined.  This of course depends on the
@@ -96,7 +96,7 @@ affect processing.  Typically this means at the start or end of a major
 step in the processing of a request, at a point where either useful
 information can be passed to a callout and/or the callout can affect
 the processing of the component. The latter is achieved in either or both
-of the following eays:
+of the following ways:
 
 - Setting the "skip" flag.  This is a boolean flag that the callout can set
   and is a quick way of passing information back to the component.  It is used
@@ -460,7 +460,7 @@ the libraries, then resuming processing.
 Previous sections have discussed callout registration by user libraries.
 It is possible for a component to register its own functions (i.e. within
 its own address space) as hook callouts.  These functions are called
-in eactly the same way as user callouts, being passed their arguments
+in exactly the same way as user callouts, being passed their arguments
 though a CalloutHandle object.  (Guidelines for writing callouts can be
 found in @ref hooksdgDevelopersGuide.)
 
index 1631d6acb2371fdf32b577c29ade5aa4bdca8179..d365803885c9ddab3dc3109fedf212068054b6f0 100644 (file)
 
  Kea has the configuration option to allow static linking.  What this
  means is that it links against the static Kea libraries and not
- the shareable ones - although it links against the shareable system
+ the sharable ones - although it links against the sharable system
  libraries like "libc" and "libstdc++" and well as the sharable libraries
  for third-party packages such as log4cplus and MySql.
 
  a Kea shared library containing a global object, address space
  is assigned for it.  When the hooks framework loads a user-library
  linked against the same Kea shared library, the operating system
- recognises that the library is already loaded (and initialized) and
+ recognizes that the library is already loaded (and initialized) and
  uses its definition of the global object.  Thus both the code in the
  Kea image and the code in the user-written shared library
  reference the same object.
  In particular, there appears to be an issue with the scenario where a
  user-written hooks library is run by a statically-linked Kea and then
  unloaded.  As far as can be determined, on unload the system attempts to
- delete the same logger twice.  This is alleviated by explictly clearing
+ delete the same logger twice.  This is alleviated by explicitly clearing
  the loggerptr_ variable in the isc::log::Logger destructor, but there
  is a suspicion that some memory might be lost in these circumstances.
  This is still under investigation.
index 0958677fc25d759f327fdfc8079bc4cd4b9cb1b1..dacbef2c1bcfcc61426f671a74a793b77c820ef3 100644 (file)
@@ -99,7 +99,7 @@ public:
 
     /// @brief Calls the callouts for a given hook
     ///
-    /// Iterates through the libray handles and calls the callouts associated
+    /// Iterates through the library handles and calls the callouts associated
     /// with the given hook index.
     ///
     /// @note This method invalidates the current library index set with
@@ -203,7 +203,7 @@ private:
 
     /// @brief Constructor
     ///
-    /// This is private as the object is a singleton and can only be addessed
+    /// This is private as the object is a singleton and can only be addressed
     /// through the getHooksManager() static method.
     HooksManager();
 
@@ -290,7 +290,8 @@ private:
     /// in some cases, server authors may not do that.  This method is called
     /// whenever any hooks execution function is invoked (checking callouts,
     /// calling callouts or returning a callout handle).  If the HooksManager
-    /// is unitialised, it will initialize it with an "empty set" of libraries.
+    /// is uninitialized, it will initialize it with an "empty set"
+    /// of libraries.
     ///
     /// For speed, the test of whether initialization is required is done
     /// in-line here.  The actual initialization is performed in
index 8cbc7089af76606a916556d9bc70f85a3ba52f61..8ee3812f6f6687c85af9984f88188ab34f4ac29b 100644 (file)
@@ -50,7 +50,7 @@ to as "user code".)  At specific points in its processing
 data that the user code can examine and, if required, modify.
 Kea uses the modified data in the remainder of its processing.
 
-In order to minimise the interaction between Kea and the user
+In order to minimize the interaction between Kea and the user
 code, the latter is built independently of Kea in the form of
 a shared library (or libraries).  These are made known to Kea
 through its configuration mechanism, and Kea loads the library at
@@ -420,7 +420,7 @@ later in the list are able to examine (and modify) the settings of earlier ones.
 
 @subsubsection hooksdgCalloutContext Per-Request Context
 
-Although the Kea modules can be characterised as handling a single
+Although the Kea modules can be characterized as handling a single
 packet at a time - e.g. the DHCPv4 server receives a DHCPDISCOVER packet,
 processes it and responds with an DHCPOFFER, this may not always be true.
 Future developments may have the server processing multiple packets
@@ -578,8 +578,8 @@ int pkt4_send(CalloutHandle& handle) {
 
 @subsection hooksdgBuild Building the Library
 
-Building the code requires building a shareable library.  This requires
-the the code be compiled as positition-independent code (using the
+Building the code requires building a sharable library.  This requires
+the the code be compiled as position-independent code (using the
 compiler's "-fpic" switch) and linked as a shared library (with the
 linker's "-shared" switch).  The build command also needs to point to
 the Kea include directory and link in the appropriate libraries.
@@ -765,7 +765,7 @@ int pkt4_receive(CalloutHandle& handle) {
     si->setSomething(...);
 
     // The pointed-to information has been updated but the pointer has not
-    // altered, so theree is no need to reset the context.
+    // altered, so there is no need to reset the context.
 }
 
 // No context_destroy callout is needed to delete the allocated
@@ -860,7 +860,7 @@ registered.  The same CalloutHandle is passed between them, so any
 change made to the CalloutHandle's arguments, "skip" flag, or per-request
 context by the first is visible to the second.
 
-@subsubsection hooksdgDynamicRegistration Dynamic Registration and Reregistration of Callouts
+@subsubsection hooksdgDynamicRegistration Dynamic Registration and Re-registration of Callouts
 
 The previous sections have dealt with callouts being registered during
 the call to "load".  The hooks framework is more flexible than that
index 4fe47cd301e721859d1bb4f62c76cd34afe80414..6978be7e76114ec5a61153c5093fceebdef0acad 100644 (file)
@@ -81,7 +81,7 @@ public:
     /// @param name Name of the hook to which the callout is added.
     /// @param callout Pointer to the callout function to be registered.
     ///
-    /// @throw NoSuchHook The hook name is unrecognised.
+    /// @throw NoSuchHook The hook name is unrecognized.
     /// @throw Unexpected The hook name is valid but an internal data structure
     ///        is of the wrong size.
     void registerCallout(const std::string& name, CalloutPtr callout);
@@ -97,7 +97,7 @@ public:
     ///
     /// @return true if a one or more callouts were deregistered.
     ///
-    /// @throw NoSuchHook The hook name is unrecognised.
+    /// @throw NoSuchHook The hook name is unrecognized.
     /// @throw Unexpected The hook name is valid but an internal data structure
     ///        is of the wrong size.
     bool deregisterCallout(const std::string& name, CalloutPtr callout);
@@ -112,7 +112,7 @@ public:
     ///
     /// @return true if one or more callouts were deregistered.
     ///
-    /// @throw NoSuchHook Thrown if the hook name is unrecognised.
+    /// @throw NoSuchHook Thrown if the hook name is unrecognized.
     bool deregisterAllCallouts(const std::string& name);
 
 private:
index 3057d255e80e46d9e7cbe45b4bf106edfe77c9d6..6e526a3463295d999c1586dae6d4e897ea15aa2e 100644 (file)
@@ -111,7 +111,7 @@ ServerHooks::getName(int index) const {
     // Get iterator to matching element.
     InverseHookCollection::const_iterator i = inverse_hooks_.find(index);
     if (i == inverse_hooks_.end()) {
-        isc_throw(NoSuchHook, "hook index " << index << " is not recognised");
+        isc_throw(NoSuchHook, "hook index " << index << " is not recognized");
     }
 
     return (i->second);
@@ -125,7 +125,7 @@ ServerHooks::getIndex(const string& name) const {
     // Get iterator to matching element.
     HookCollection::const_iterator i = hooks_.find(name);
     if (i == hooks_.end()) {
-        isc_throw(NoSuchHook, "hook name " << name << " is not recognised");
+        isc_throw(NoSuchHook, "hook name " << name << " is not recognized");
     }
 
     return (i->second);
index c3f3b1d09fba8144b1634624479f3d740113fb49..979213cef9f9ab50693780bc6ebb36264177ed19 100644 (file)
@@ -47,7 +47,7 @@ public:
     /// Sets up a collection of three LibraryHandle objects to use in the test.
     CalloutManagerTest() {
 
-        // Set up the server hooks.  There is sone singleton for all tests,
+        // Set up the server hooks.  There is one singleton for all tests,
         // so reset it and explicitly set up the hooks for the test.
         ServerHooks& hooks = ServerHooks::getServerHooks();
         hooks.reset();
@@ -292,7 +292,7 @@ TEST_F(CalloutManagerTest, RegisterCallout) {
     EXPECT_EQ(13465, callout_value_);
 
     // Add a callout from library index 1 - this should appear between the
-    // callouts from library index 0 and linrary index 2.
+    // callouts from library index 0 and library index 2.
     getCalloutManager()->setLibraryIndex(1);
     getCalloutManager()->registerCallout("alpha", callout_seven);
     callout_value_ = 0;
index 803e25c79fecceb124ee5a084ba72f9b26d35940..fef93abbaa32b78840fb746db9394b235ce1dd68 100644 (file)
@@ -67,7 +67,7 @@ public:
     /// operation on it and r0 yielding a result r1.  Hence we can say that
     /// @f[ r1 = hookpt_one(r0, d1) @f]
     ///
-    /// Callout hookpt_two is passed a value d2 and peforms another simple
+    /// Callout hookpt_two is passed a value d2 and performs another simple
     /// arithmetic operation on it and d2, yielding r2, i.e.
     /// @f[ r2 = hookpt_two(d1, d2) @f]
     ///
@@ -96,7 +96,7 @@ public:
     void executeCallCallouts(
             const boost::shared_ptr<isc::hooks::CalloutManager>& manager,
             int r0, int d1, int r1, int d2, int r2, int d3, int r3) {
-        static const char* COMMON_TEXT = " callout returned the wong value";
+        static const char* COMMON_TEXT = " callout returned the wrong value";
         static const char* RESULT = "result";
 
         int result;
index 984909bfd45dfdba5e6e3a30db4d9a0f152cb37e..267dca48565bfb126d51463c42cbe424c528fa3d 100644 (file)
@@ -91,7 +91,7 @@ hook_nonstandard_two(CalloutHandle& handle) {
     return (0);
 }
 
-// Final callout multplies the current running total by data_3.
+// Final callout multiplies the current running total by data_3.
 
 static int
 hook_nonstandard_three(CalloutHandle& handle) {
index 136eeaef2bff2d7386eb5c50aff19039a8831d32..a2c055b78464d5885b380c1c68d54dfedd42a838 100644 (file)
@@ -62,7 +62,7 @@ public:
     ///        the order they are used.
     void executeCallCallouts(int r0, int d1, int r1, int d2, int r2, int d3,
                              int r3) {
-        static const char* COMMON_TEXT = " callout returned the wong value";
+        static const char* COMMON_TEXT = " callout returned the wrong value";
         static const char* RESULT = "result";
 
         // Get a CalloutHandle for the calculation.
@@ -171,7 +171,7 @@ TEST_F(HooksManagerTest, CalloutHandleUnloadLibrary) {
     // Load the libraries.
     EXPECT_TRUE(HooksManager::loadLibraries(library_names));
 
-    // Execute the callouts.  Thiis library implements:
+    // Execute the callouts.  This library implements:
     //
     // r3 = (7 * d1 - d2) * d3
     {
@@ -205,7 +205,7 @@ TEST_F(HooksManagerTest, CalloutHandleLoadLibrary) {
     // Load the libraries.
     EXPECT_TRUE(HooksManager::loadLibraries(library_names));
 
-    // Execute the callouts.  Thiis library implements:
+    // Execute the callouts.  This library implements:
     //
     // r3 = (7 * d1 - d2) * d3
     {
index 7fdbb7d22625520c2272b7c3f30fa314fd8e4d52..9baca2852d7c7910cb6f3840b050bbf3541423cf 100644 (file)
@@ -146,7 +146,7 @@ TEST_F(LibraryManagerCollectionTest, NoLibrariesLoaded) {
     boost::shared_ptr<CalloutManager> manager =
                                       lm_collection.getCalloutManager();
 
-    // Eecute the calculation - callouts can be called but as nothing
+    // Execute the calculation - callouts can be called but as nothing
     // happens, the result should always be -1.
     executeCallCallouts(manager, -1, 3, -1, 22, -1, 83, -1);
 }
index 9336946857006141686f0427667b3ff821b5085f..86e86e6aa413d3ed3a594b1cbf0a1b047ee5e73f 100644 (file)
@@ -376,7 +376,7 @@ TEST_F(LibraryManagerTest, CheckUnloadException) {
 }
 
 // Check that the case of the library's unload() function returning a
-// success is handled correcty.
+// success is handled correctly.
 
 TEST_F(LibraryManagerTest, CheckUnload) {