diff options
author | Andrii Pientsov <andrii.pientsov@globallogic.com> | 2020-05-26 11:16:50 -0500 |
---|---|---|
committer | Andrii Pientsov <andrii.pientsov@globallogic.com> | 2020-05-26 11:16:50 -0500 |
commit | 84811012a52cc276e59038d5c85bf5d66425286a (patch) | |
tree | d238a79ee805657b7c00271d639b7cc867ff863e | |
parent | ee1965a9d8dc206a3b712071058fe0f7f5aee759 (diff) | |
parent | 203bf8164ae731682b6a524f8c961b6e2de96504 (diff) | |
download | sms-utils-84811012a52cc276e59038d5c85bf5d66425286a.tar.gz sms-utils-84811012a52cc276e59038d5c85bf5d66425286a.tar.bz2 sms-utils-84811012a52cc276e59038d5c85bf5d66425286a.zip |
Merge branch 'master' into 'MTX-3262-single-instance-guard'
# Conflicts:
# src/atcmd.c
# src/utils.c
# src/utils.h
-rw-r--r-- | src/atcmd.c | 8 | ||||
-rw-r--r-- | src/utils.c | 2 | ||||
-rw-r--r-- | src/utils.h | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/atcmd.c b/src/atcmd.c index 1aa415c..76ee98c 100644 --- a/src/atcmd.c +++ b/src/atcmd.c @@ -1479,7 +1479,11 @@ int sms_device_close(int fd) ret = tty_close(fd); - lock_file = device_unlock(lock_file); + if (lock_path) { + unlink(lock_path); + free(lock_path); + lock_path = NULL; + } return ret; } @@ -1566,4 +1570,4 @@ int is_quectel_model() } return 0; -} +}
\ No newline at end of file diff --git a/src/utils.c b/src/utils.c index 138c87d..5d46a36 100644 --- a/src/utils.c +++ b/src/utils.c @@ -33,7 +33,6 @@ #include <fcntl.h> #include <string.h> #include <linux/limits.h> -#include <sys/file.h> #include "utils.h" #include "log.h" @@ -297,4 +296,3 @@ int indexOfChar(const char *array, int len, char character) } return -1; } - diff --git a/src/utils.h b/src/utils.h index 62d76f1..32b4c89 100644 --- a/src/utils.h +++ b/src/utils.h @@ -45,4 +45,4 @@ int indexOfChar(const char *array, int len, char character); #define indentf(n, format, args...) \ printf("%*s" format , n, "" , ## args) -#endif /* ~__UTILS_H */ +#endif /* ~__UTILS_H */
\ No newline at end of file |