Ticket #2 (closed defect: fixed)
Perl warnings in 'nic_updateable' function
| Reported by: | antespi | Owned by: | wimpunk |
|---|---|---|---|
| Priority: | minor | Milestone: | 3.8 |
| Component: | ddclient | Version: | svn |
| Keywords: | Cc: | cpick |
Description
Hi everyone,
We have detect some perl warnings in 'nic_updateable' function. Some configuration strings are not defined (because are not applied in our case).
In order to fix these warnings we introduce this work arround in 'nic_updateable' function
sub nic_updateable {
(...)
if ($config{$host}{'login'} eq '') {
(...)
} elsif ((defined($cache{$host}{'static'}) && defined($config{$host}{'static'}) &&
($cache{$host}{'static'} ne $config{$host}{'static'})) ||
(defined($cache{$host}{'wildcard'}) && defined($config{$host}{'wildcard'}) &&
($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'})) ||
(defined($cache{$host}{'mx'}) && defined($config{$host}{'mx'}) &&
($cache{$host}{'mx'} ne $config{$host}{'mx'})) ||
(defined($cache{$host}{'backupmx'}) && defined($config{$host}{'backupmx'}) &&
($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) ) {
info("updating %s because host settings have been changed.", $host);
$update = 1;
Then no more warnings because :
- $cache{$host}{'static'}
- $config{$host}{'static'}
- $cache{$host}{'wildcard'}
- $config{$host}{'wildcard'}
- $cache{$host}{'mx'}
- $config{$host}{'mx'}
- $cache{$host}{'backupmx'}
- $config{$host}{'backupmx'}
are not defined.
This work-around was applied to "debian 5.0 - ddclient 3.7.3"
Please, change your svn version if you think this is correct.
Thanks in advance,
Antonio Espinosa
aespinosa at inetnova dot com