1
0

debugged notification of availability of devices

This commit is contained in:
2022-08-12 10:41:55 +02:00
parent 247d1fd17d
commit df94a6becf
18 changed files with 176 additions and 70 deletions

View File

@ -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();
?>