mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Fix #39 Log error when the PN pusher is not configured
This commit is contained in:
parent
46c2326e6b
commit
448e200a72
2 changed files with 11 additions and 5 deletions
|
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
namespace App\Libraries;
|
namespace App\Libraries;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class FlexisipPusherConnector
|
class FlexisipPusherConnector
|
||||||
{
|
{
|
||||||
private $pusherPath;
|
private $pusherPath;
|
||||||
|
|
@ -38,16 +40,20 @@ class FlexisipPusherConnector
|
||||||
{
|
{
|
||||||
$payload = json_encode(['token' => $token]);
|
$payload = json_encode(['token' => $token]);
|
||||||
|
|
||||||
$command = $this->pusherPath
|
if (!empty($this->pusherPath)) {
|
||||||
|
$command = $this->pusherPath
|
||||||
. " --pn-provider '" . $this->pnProvider . "'"
|
. " --pn-provider '" . $this->pnProvider . "'"
|
||||||
. " --pn-param '" . $this->pnParam . "'"
|
. " --pn-param '" . $this->pnParam . "'"
|
||||||
. " --pn-prid " . $this->pnPrid
|
. " --pn-prid " . $this->pnPrid
|
||||||
. " --apple-push-type Background"
|
. " --apple-push-type Background"
|
||||||
. " --customPayload '" . $payload . "'";
|
. " --customPayload '" . $payload . "'";
|
||||||
|
|
||||||
$output = null;
|
$output = null;
|
||||||
$retval = null;
|
$retval = null;
|
||||||
|
|
||||||
return exec($command, $output, $retval);
|
return exec($command, $output, $retval);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log::error('Pusher path not configured');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
#%define _datadir %{_datarootdir}
|
#%define _datadir %{_datarootdir}
|
||||||
#%define _docdir %{_datadir}/doc
|
#%define _docdir %{_datadir}/doc
|
||||||
|
|
||||||
%define build_number 158
|
%define build_number 159
|
||||||
%define var_dir /var/opt/belledonne-communications
|
%define var_dir /var/opt/belledonne-communications
|
||||||
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager
|
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue