summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksym Telychko <maksym.telychko@globallogic.com>2020-04-17 09:57:13 +0300
committerMaksym Telychko <maksym.telychko@globallogic.com>2020-04-18 09:02:18 +0300
commit637610f24cb0f05ebe0edc7ab0c0be37ede2aee7 (patch)
tree52edaeb802269bcb5db26255f8d8c41d92913388
parentaf7b696d3b516aa68995503f642495f3a7082e6d (diff)
downloadsms-utils-637610f24cb0f05ebe0edc7ab0c0be37ede2aee7.tar.gz
sms-utils-637610f24cb0f05ebe0edc7ab0c0be37ede2aee7.tar.bz2
sms-utils-637610f24cb0f05ebe0edc7ab0c0be37ede2aee7.zip
MTX-3262 mpower: fix lock return value
-rw-r--r--src/atcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/atcmd.c b/src/atcmd.c
index eab4210..1aa415c 100644
--- a/src/atcmd.c
+++ b/src/atcmd.c
@@ -1471,7 +1471,7 @@ static int sms_atcmd_init(int fd)
return 0;
}
-static struct Lock *lock_file;
+static int lock_file;
int sms_device_close(int fd)
{
@@ -1495,7 +1495,7 @@ int sms_device_open(void)
}
lock_file = device_lock(Global.core.device);
- if (!lock_file) {
+ if (lock_file < 0) {
sms_device_close(fd);
return -1;
}