]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Update python documentation for init_standard().
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Thu, 11 Apr 2019 15:03:04 +0000 (15:03 +0000)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Thu, 11 Apr 2019 15:03:04 +0000 (15:03 +0000)
- Typos.

git-svn-id: file:///svn/unbound/trunk@5157 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
doc/unbound.conf.5.in
pythonmod/doc/examples/example0-1.py
pythonmod/doc/examples/example0.rst
pythonmod/examples/edns.py
pythonmod/examples/inplace_callbacks.py
util/data/msgreply.h

index 03d6139900670fa51d473deef18f4ddbac4dad0c..253a1429f547dad422acfb7f937da43a196c990b 100644 (file)
@@ -1,3 +1,7 @@
+11 April 2019: George
+       - Update python documentation for init_standard().
+       - Typos.
+
 11 April 2019: Wouter
        - Fix that auth zone uses correct network type for sockets for
          SOA serial probes.  This fixes that probes fail because earlier
index 0567c4d34b8177894931dd4437e99ecd5c2b24e5..eff757e67319a2478517d21746bc6c7f7b990189 100644 (file)
@@ -828,7 +828,7 @@ Can be given multiple times, for different domains.
 .TP
 .B qname\-minimisation: \fI<yes or no>
 Send minimum amount of information to upstream servers to enhance privacy.
-Only sent minimum required labels of the QNAME and set QTYPE to A when
+Only send minimum required labels of the QNAME and set QTYPE to A when
 possible. Best effort approach; full QNAME and original QTYPE will be sent when
 upstream replies with a RCODE other than NOERROR, except when receiving
 NXDOMAIN from a DNSSEC signed zone. Default is yes.
index 5ae48d16674aedc1e1e0c1dd9a997e0e9ea64ccf..7904f73a55e8a1cb1e5822e74cf6fff7c1ddfd71 100644 (file)
@@ -1,8 +1,11 @@
-
 def init(id, cfg):
    log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, cfg.python_script))
    return True
 
+def init_standard(id, env):
+   log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, env.cfg.port, env.cfg.python_script))
+   return True
+
 def deinit(id):
    log_info("pythonmod: deinit called, module id is %d" % id)
    return True
index 8fff41f33c7256ab1197302993c4b32b4080c722..693972a141a4f2a863abdb36a864257f78c5b9f5 100644 (file)
@@ -54,6 +54,25 @@ Script file must contain four compulsory functions:
       return True
 
 
+.. function:: init_standard(id, env)
+
+   Initialize module internals, like database etc.
+   Called just once on module load.
+
+   *Preferred* over the init() function above as this function's signature is the
+   same as the C counterpart and allows for extra functionality during init.
+   The previously accessible configuration options can now be found in env.cfg.
+
+   :param id: module identifier (integer)
+   :param env: :class:`module_env` module environment
+
+::
+
+    def init_standard(id, env):
+       log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, env.cfg.port, env.cfg.python_script))
+       return True
+
+
 .. function:: deinit(id)
 
    Deinitialize module internals.
index 37ce9e27923d62fa6163a8019b3dfb4116a19619..ca1bb8da710d6bab3c306eae55e51bf326fcb499 100644 (file)
@@ -78,7 +78,7 @@ def init_standard(id, env):
     extra functionality during init.
     ..note:: This function is preferred by unbound over the old init function.
     ..note:: The previously accessible configuration options can now be found in
-             env.cgf.
+             env.cfg.
     """
     log_info("python: inited script {}".format(env.cfg.python_script))
 
index 776add8c29adf84b7f71734b4d6c22447a3a8c61..768c2d0138c543a9bcb47b196ddb01db1f606938 100644 (file)
@@ -275,7 +275,7 @@ def init_standard(id, env):
 
     ..note:: This function is preferred by unbound over the old init function.
     ..note:: The previously accessible configuration options can now be found in
-             env.cgf.
+             env.cfg.
 
     """
     log_info("python: inited script {}".format(env.cfg.python_script))
index a455c4d2b37422b6601640d7922dd15a04209641..8d75f9b12f3ae5170fba9eca7c57e218aa958370 100644 (file)
@@ -157,7 +157,7 @@ struct reply_info {
        time_t prefetch_ttl;
 
        /** 
-        * Reply TTL extended with serve exipred TTL, to limit time to serve
+        * Reply TTL extended with serve expired TTL, to limit time to serve
         * expired message.
         */
        time_t serve_expired_ttl;