Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rhansen
Copy link
Member

@rhansen rhansen commented Aug 18, 2024

No description provided.

rhansen added 30 commits August 18, 2024 00:35
The `ssl` option is a global option, not a per-host option.  This
commit could instead do:

    local $ddclient::globals{ssl} = 0;

but it's more straightforward to include `http://` in the `server`
option, and it tests that `server` supports the inclusion of the
scheme.
The `verbose` option is a global option, not a per-host option.
to prevent metacharacter issues.
This does not affect the `--help` command-line argument.

The `help` setting didn't do anything useful, and it didn't make sense
to set `help=1` in the config file (or pass `--options=help=1`), so
this removal is unlikely to affect anyone.  If the setting does exist,
the user will get a warning and the setting will be ignored.
Variable declarations already have a `required` flag, which makes the
type confusing.  What would it mean for a variable to be a required
`T_OFQDN`?  And how would an optional `T_FQDN` differ from an optional
`T_OFQDN`?
Before, only required values that were invalid produced a warning.
Non-required values were quietly ignored.
This avoids bugs if a usage forgets to normalize the value.
This is for consistency, and to ensure that all possible ways of
configuring are respected.
This makes it possible to convey details about why the value was
deemed invalid.  It also allows `undef` to be treated as a valid
value.
This makes the behavior transparent to the rest of ddclient, which
will make it possible for a future commit to simplify option
processing.
Allow newlines to be in values, but stop searching for assignments
once an unescaped/unquoted newline is discovered.  This is preparation
to using `parse_assignments` to process the `--options` command-line
argument, which might have embedded newlines.
This simplifies the code and enables quoting of special characters.
Different protocols can have different default values for a particular
variable.  Grab the protocol-specific variable definition if given a
hostname when looking up the variable's default.
There's no need -- if the key doesn't exist the value returned is
already `undef`.  This prevents debug output from being littered with
`undef` lines.
The alternative is to "fix" the code to match the original intention,
but users haven't been complaining so it's better to avoid the risk of
introducing a new bug in the fix.
The `opt` function falls back to global/default if the value is
undefined, even if it is explicitly set to `undef`.  `group_hosts_by`
should behave the same.
This makes it possible to leave `$config{$h}{$var}` undefined to have
it fall back to `%opt`, `%globals`, or the variable's default value.
There's no need -- if the key doesn't exist the value returned is
already `undef`.  This prevents debug output from being littered with
`undef` lines.
@rhansen rhansen merged commit 12ff5bf into ddclient:master Aug 18, 2024
@rhansen rhansen deleted the config branch August 18, 2024 05:27
rhansen added a commit that referenced this pull request Aug 18, 2024
I forgot to update these before merging PR #733.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant