Merge branch 'master' of https://github.com/RaspbianFrance/RaspiSMS
This commit is contained in:
commit
fd1e7b5519
|
@ -188,13 +188,14 @@ namespace adapters;
|
|||
}
|
||||
|
||||
$command_parts = [
|
||||
'LC_ALL=C',
|
||||
'gammu',
|
||||
'--config',
|
||||
escapeshellarg($this->data['config_file']),
|
||||
'sendsms',
|
||||
'TEXT',
|
||||
escapeshellarg($destination),
|
||||
'-text',
|
||||
'-textutf8',
|
||||
escapeshellarg($text),
|
||||
'-validity',
|
||||
'MAX',
|
||||
|
@ -337,8 +338,11 @@ namespace adapters;
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// The command returns 123 on failed execution (even if SIM is already unlocked), and returns 0 if unlock was successful
|
||||
// We can directly return true if command was succesful
|
||||
$command_parts = [
|
||||
'LC_ALL=C',
|
||||
'gammu',
|
||||
'--config',
|
||||
escapeshellarg($this->data['config_file']),
|
||||
|
@ -348,9 +352,15 @@ namespace adapters;
|
|||
];
|
||||
|
||||
$result = $this->exec_command($command_parts);
|
||||
if (0 === $result['return'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//Check security status
|
||||
// The command returns 0 regardless of the SIM security state
|
||||
$command_parts = [
|
||||
'LC_ALL=C',
|
||||
'gammu',
|
||||
'--config',
|
||||
escapeshellarg($this->data['config_file']),
|
||||
|
|
Loading…
Reference in New Issue