On 11/22/06, Daniel Thaler <da...@dt...> wrote:
> Hi!
>
> I encountered the following bug:
> When ddclient isn't running in daemon mode, it always sends mail to the
> mail-failure address, even when the dns got updated successfully.
>
>
> When ddclient isn't running in daemon mode, it modifies the variable
> $result like this before calling sendmail():
> $result = $result eq 'OK' ? 0 : 1;
>
> Sendmail() then checks whether $result is equal to 'OK', and if it
> isn't, mail gets sent to the failure address...
>
> I've attached a patch, hope you like it :)
>
> -- Daniel Thaler
>
>
> --- old/ddclient 2006-11-22 22:25:35.000000000 +0100
> +++ new/ddclient 2006-11-22 22:23:16.000000000 +0100
> @@ -1344,7 +1344,7 @@
> sub sendmail {
> my $recipients = opt('mail');
>
> - if (opt('mail-failure') && ($result ne 'OK')) {
> + if (opt('mail-failure') && ($result ne 'OK' && $result != 0)) {
> $recipients = opt('mail-failure');
> }
> if ($msgs && $recipients && $msgs ne $last_msgs) {
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Ddclient-support mailing list
> Ddc...@li...
> https://lists.sourceforge.net/lists/listinfo/ddclient-support
>
>
>
Tnx Daniel,
Patch added to subversion and will be in next release.
wimpunk.
|