diff options
author | Jeff Hatch <jhatch@multitech.com> | 2020-06-10 08:14:39 -0500 |
---|---|---|
committer | Jeff Hatch <jhatch@multitech.com> | 2020-06-10 08:14:39 -0500 |
commit | 10ccba808dab5a17b06456793e83d53501e39dc8 (patch) | |
tree | d238a79ee805657b7c00271d639b7cc867ff863e /src/atcmd.c | |
parent | 203bf8164ae731682b6a524f8c961b6e2de96504 (diff) | |
parent | 84811012a52cc276e59038d5c85bf5d66425286a (diff) | |
download | sms-utils-10ccba808dab5a17b06456793e83d53501e39dc8.tar.gz sms-utils-10ccba808dab5a17b06456793e83d53501e39dc8.tar.bz2 sms-utils-10ccba808dab5a17b06456793e83d53501e39dc8.zip |
Merge branch 'MTX-3262-single-instance-guard' into 'master'
Mtx 3262 single instance guard
See merge request !8
Diffstat (limited to 'src/atcmd.c')
-rw-r--r-- | src/atcmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/atcmd.c b/src/atcmd.c index 97fd34b..76ee98c 100644 --- a/src/atcmd.c +++ b/src/atcmd.c @@ -1471,7 +1471,7 @@ static int sms_atcmd_init(int fd) return 0; } -static char *lock_path; +static int lock_file; int sms_device_close(int fd) { @@ -1498,8 +1498,8 @@ int sms_device_open(void) return -1; } - lock_path = device_lock(Global.core.device); - if (!lock_path) { + lock_file = device_lock(Global.core.device); + if (lock_file < 0) { sms_device_close(fd); return -1; } @@ -1570,4 +1570,4 @@ int is_quectel_model() } return 0; -} +}
\ No newline at end of file |