From ecf1e402b9c9f316fa6952265d8932e7f20fad49 Mon Sep 17 00:00:00 2001 From: Hyihong Chae Date: Tue, 30 May 2017 20:19:38 +0900 Subject: [PATCH] fix SENSYS issue. (TNEXT-744) Change-Id: Ia1fb37801da4e72306c9b1522156dda2547bdeec Signed-off-by: HyiHong Chae --- packaging/mtp-responder.spec | 2 +- src/util/mtp_thread.c | 7 ++++++- 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; } -- 2.7.4