From 60fe104e91501d5e92e09a785cae20cb57e9fb91 Mon Sep 17 00:00:00 2001 From: Jooseok Park Date: Tue, 3 Jan 2017 20:42:03 +0900 Subject: fix the itc crash - TC: ITc_iotcon_remote_resource_get_cached_representation_p - Although find callback is removed, sometimes callback is called - it is caused by timing issue - So, need to double-check callback pointer Change-Id: I0f6e95cd527cac349f04bc47d29cdee021c268f5 --- packaging/iotcon.spec | 2 +- src/ic-ioty-ocprocess.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packaging/iotcon.spec b/packaging/iotcon.spec index 42be1a5..38aa22a 100644 --- a/packaging/iotcon.spec +++ b/packaging/iotcon.spec @@ -1,6 +1,6 @@ Name: iotcon Summary: Tizen IoT Connectivity -Version: 0.3.9 +Version: 0.3.10 Release: 0 Group: Network & Connectivity/Service License: Apache-2.0 diff --git a/src/ic-ioty-ocprocess.c b/src/ic-ioty-ocprocess.c index 2e1fe46..e1f8ce2 100644 --- a/src/ic-ioty-ocprocess.c +++ b/src/ic-ioty-ocprocess.c @@ -141,6 +141,10 @@ static gboolean _icl_ioty_ocprocess_find_idle_cb(gpointer p) resource = resource_list->data; resource->is_found = true; cb = (iotcon_found_resource_cb)cb_data->cb; + if (NULL == cb) { + WARN("It is already stopped"); + return G_SOURCE_REMOVE; + } INFO("Call the callback"); if (IOTCON_FUNC_STOP == cb(resource, IOTCON_ERROR_NONE, cb_data->user_data)) { /* Stop */ -- cgit v1.2.3