debugged notification of availability of devices
This commit is contained in:
@ -31,18 +31,18 @@ class notificationFreemobile
|
||||
// $result contains the output string
|
||||
if ($this->curlErr <= 5)
|
||||
{
|
||||
logger(DEBUG, _("Curl sending message"), false, __FILE__ . ":" . __LINE__);
|
||||
logger(DEBUG, _("Curl sending message"), __FILE__ . ":" . __LINE__);
|
||||
echo $this->url . urlencode(trim($message)) . EOL;
|
||||
curl_exec($ch);
|
||||
if (curl_errno($ch) != 0)
|
||||
{
|
||||
$this->curlErr += 1;
|
||||
$this->lastTry = time();
|
||||
logger(ERROR, sprintf( _("Curl return error %d: %s when sending notification"), curl_errno($ch), curl_error($ch)), false, __FILE__ . ":" . __LINE__);
|
||||
logger(ERROR, sprintf( _("Curl return error %d: %s when sending notification"), curl_errno($ch), curl_error($ch)), __FILE__ . ":" . __LINE__);
|
||||
$error = true;
|
||||
}else
|
||||
{
|
||||
logger(DEBUG, sprintf(_("Curl return: %s when sending notification"), curl_error($ch)), false, __FILE__ . ":" . __LINE__);
|
||||
logger(DEBUG, sprintf(_("Curl return: %s when sending notification"), curl_error($ch)), __FILE__ . ":" . __LINE__);
|
||||
$this->curlErr = 0;
|
||||
}
|
||||
}else
|
||||
@ -61,5 +61,9 @@ class notificationFreemobile
|
||||
}
|
||||
}
|
||||
|
||||
// constant definition
|
||||
define("NOTIF_DEFAULT_DEST", "daniel");
|
||||
|
||||
//init class
|
||||
$notificationMethods["freemobile"] = new notificationFreemobile();
|
||||
?>
|
||||
|
Reference in New Issue
Block a user