diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-06-02 19:30:38 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-06-02 19:30:38 -0500 |
commit | dbd919ecd58ba49a9955b874b1f1b92a69f9d575 (patch) | |
tree | b28e46a4e7f607bad5fdc2ba30ae179b930eedf1 | |
parent | f135a010871ca9e230861e1c4b7a832e8a0bf077 (diff) | |
download | pfsense-dbd919ecd58ba49a9955b874b1f1b92a69f9d575.zip pfsense-dbd919ecd58ba49a9955b874b1f1b92a69f9d575.tar.gz |
Don't call growl if the configured address isn't an IP or resolvable
hostname. Avoids 1 minute timeout delay in fsockopen in growl.class. Cuts
that down to about a 20 second timeout. Ticket #4739
-rw-r--r-- | etc/inc/notices.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc index bad3a32..91d3800 100644 --- a/etc/inc/notices.inc +++ b/etc/inc/notices.inc @@ -387,7 +387,7 @@ function notify_via_growl($message, $force=false) { $growl_name = $config['notifications']['growl']['name']; $growl_notification = $config['notifications']['growl']['notification_name']; - if(!empty($growl_ip)) { + if(!empty($growl_ip) && (is_ipaddr($growl_ip) || dns_get_record($growl_ip, DNS_A) || dns_get_record($growl_ip, DNS_AAAA))) { $growl = new Growl($growl_ip, $growl_password, $growl_name); $growl->notify("{$growl_notification}", gettext(sprintf("%s (%s) - Notification", $g['product_name'], $hostname)), "{$message}"); } |