Don't bother to check SIM security status on successful unlock
This commit is contained in:
parent
ad1f798ae6
commit
82021648a3
|
@ -338,6 +338,8 @@ namespace adapters;
|
||||||
return true;
|
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 = [
|
$command_parts = [
|
||||||
'gammu',
|
'gammu',
|
||||||
'--config',
|
'--config',
|
||||||
|
@ -348,8 +350,13 @@ namespace adapters;
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $this->exec_command($command_parts);
|
$result = $this->exec_command($command_parts);
|
||||||
|
if (0 === $result['return'])
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//Check security status
|
//Check security status
|
||||||
|
// The command returns 0 regardless of the SIM security state
|
||||||
$command_parts = [
|
$command_parts = [
|
||||||
'gammu',
|
'gammu',
|
||||||
'--config',
|
'--config',
|
||||||
|
|
Loading…
Reference in New Issue