changed matching for success
This commit is contained in:
parent
8a91051656
commit
e3c8488b26
1 changed files with 6 additions and 6 deletions
10
ddclient
10
ddclient
|
|
@ -4720,9 +4720,7 @@ EoEXAMPLE
|
||||||
## nic_dnsexit_update
|
## nic_dnsexit_update
|
||||||
## Need update URL in this format:
|
## Need update URL in this format:
|
||||||
## http://update.dnsexit.com/RemoteUpdate.sv?login=yourlogin&password=your_ip_update_password&host=yourhost.yourdomain.com&myip=xxx.xx.xx.xxx
|
## http://update.dnsexit.com/RemoteUpdate.sv?login=yourlogin&password=your_ip_update_password&host=yourhost.yourdomain.com&myip=xxx.xx.xx.xxx
|
||||||
## Successful response is:
|
## Successful responses are: '0=Success', '4=IP not changed. To save our system resources, please don't post updates unless the IP got changed.', '11=fail to find XXX.XXX.XXX.XXX'
|
||||||
## HTTP/1.1 200 OK
|
|
||||||
## 0=Success
|
|
||||||
######################################################################
|
######################################################################
|
||||||
sub nic_dnsexit_update {
|
sub nic_dnsexit_update {
|
||||||
debug("\nnic_dnsexit_update -------------------");
|
debug("\nnic_dnsexit_update -------------------");
|
||||||
|
|
@ -4741,6 +4739,8 @@ sub nic_dnsexit_update {
|
||||||
$url .= "&password=";
|
$url .= "&password=";
|
||||||
$url .= $config{$h}{'password'};
|
$url .= $config{$h}{'password'};
|
||||||
$url .= "&host=";
|
$url .= "&host=";
|
||||||
|
$url .= $h;
|
||||||
|
$url .= "&myip=";
|
||||||
$url .= $ip;
|
$url .= $ip;
|
||||||
|
|
||||||
# Try to get URL
|
# Try to get URL
|
||||||
|
|
@ -4753,8 +4753,8 @@ sub nic_dnsexit_update {
|
||||||
}
|
}
|
||||||
last if !header_ok($h, $reply);
|
last if !header_ok($h, $reply);
|
||||||
|
|
||||||
# Response found, look for "0=Success"
|
# Response found, look for 0, 4, or 11 status as success"
|
||||||
if ($reply =~ /0=Success/)
|
if ($reply =~ /0=|4=|11=/)
|
||||||
{
|
{
|
||||||
$config{$h}{'ip'} = $ip;
|
$config{$h}{'ip'} = $ip;
|
||||||
$config{$h}{'mtime'} = $now;
|
$config{$h}{'mtime'} = $now;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue