Fix #39 Log error when the PN pusher is not configured

This commit is contained in:
Timothée Jaussoin 2022-10-20 16:56:21 +02:00
parent 46c2326e6b
commit 448e200a72
2 changed files with 11 additions and 5 deletions

View file

@ -19,6 +19,8 @@
namespace App\Libraries;
use Illuminate\Support\Facades\Log;
class FlexisipPusherConnector
{
private $pusherPath;
@ -38,16 +40,20 @@ class FlexisipPusherConnector
{
$payload = json_encode(['token' => $token]);
$command = $this->pusherPath
if (!empty($this->pusherPath)) {
$command = $this->pusherPath
. " --pn-provider '" . $this->pnProvider . "'"
. " --pn-param '" . $this->pnParam . "'"
. " --pn-prid " . $this->pnPrid
. " --apple-push-type Background"
. " --customPayload '" . $payload . "'";
$output = null;
$retval = null;
$output = null;
$retval = null;
return exec($command, $output, $retval);
return exec($command, $output, $retval);
}
Log::error('Pusher path not configured');
}
}

View file

@ -8,7 +8,7 @@
#%define _datadir %{_datarootdir}
#%define _docdir %{_datadir}/doc
%define build_number 158
%define build_number 159
%define var_dir /var/opt/belledonne-communications
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager