summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyihong Chae <hh.chae@samsung.com>2017-05-30 20:19:38 +0900
committerHyihong Chae <hh.chae@samsung.com>2017-05-30 20:21:31 +0900
commitecf1e402b9c9f316fa6952265d8932e7f20fad49 (patch)
tree6b1de2f55c11cf089dd3dd13cd857dd0eb249b15
parent1fb7cbb7a3b4dec4c02c230817369dc91a9130ed (diff)
downloadmtp-responder-ecf1e402b9c9f316fa6952265d8932e7f20fad49.tar.gz
mtp-responder-ecf1e402b9c9f316fa6952265d8932e7f20fad49.tar.bz2
mtp-responder-ecf1e402b9c9f316fa6952265d8932e7f20fad49.zip
Change-Id: Ia1fb37801da4e72306c9b1522156dda2547bdeec Signed-off-by: HyiHong Chae <hh.chae@samsung.com>
-rwxr-xr-xpackaging/mtp-responder.spec2
-rwxr-xr-xsrc/util/mtp_thread.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/packaging/mtp-responder.spec b/packaging/mtp-responder.spec
index 8317525..4d27366 100755
--- a/packaging/mtp-responder.spec
+++ b/packaging/mtp-responder.spec
@@ -5,7 +5,7 @@ ExcludeArch: %arm aarch64
Name: mtp-responder
Summary: Media Transfer Protocol daemon (responder)
-Version: 0.0.24
+Version: 0.0.25
Release: 1
Group: Network & Connectivity/Other
License: Apache-2.0
diff --git a/src/util/mtp_thread.c b/src/util/mtp_thread.c
index e96d111..e4ba76e 100755
--- a/src/util/mtp_thread.c
+++ b/src/util/mtp_thread.c
@@ -76,9 +76,14 @@ mtp_bool _util_thread_cancel(pthread_t tid)
{
mtp_int32 res;
+ if (tid == 0) {
+ ERR("tid is NULL\n");
+ return FALSE;
+ }
+
res = pthread_cancel(tid);
if (res != 0) {
- ERR("pthread_cancel Fail [%d] errno [%d]\n", tid, errno);
+ ERR("pthread_cancel Fail [%d] errno [%d]\n", tid, errno);
return FALSE;
}