summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2019-05-14 11:36:55 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2019-05-16 10:12:40 +0900
commit573af45df20973597ef5e577495606480aed5523 (patch)
treeb062656fa10f4cc34b3286e34b21ffdd630e1c9a
parentabdb85c7c8159edd327e1f80ced74bb9526e044d (diff)
downloadcamera-accepted/tizen_5.0_unified.tar.gz
camera-accepted/tizen_5.0_unified.tar.bz2
camera-accepted/tizen_5.0_unified.zip
Skip to send SERVER_DISCONNECTED error message if handle is not created.submit/tizen_5.0/20190516.014342accepted/tizen/5.0/unified/20190516.072106accepted/tizen_5.0_unified
- The error message could not be delivered to application, and it will cause crash when it's called in idle state. [Version] 0.4.17 [Profile] Common [Issue Type] Bug fix Change-Id: Ib4681ca43c895e74742a19a57866e2080058f0bc Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--src/camera.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index 58c995e..217cd19 100644
--- a/packaging/capi-media-camera.spec
+++ b/packaging/capi-media-camera.spec
@@ -1,6 +1,6 @@
Name: capi-media-camera
Summary: A Camera API
-Version: 0.4.16
+Version: 0.4.17
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/camera.c b/src/camera.c
index 0ca23f3..d980808 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -1495,7 +1495,7 @@ IDLE_EVENT_CALLBACK_DONE:
return false;
}
-static void *_camera_msg_handler_func(gpointer data)
+static gpointer _camera_msg_handler_func(gpointer data)
{
int api = 0;
int type = 0;
@@ -1867,7 +1867,7 @@ static void __camera_process_msg(camera_cb_info_s *cb_info, char *msg)
}
-static void *_camera_msg_recv_func(gpointer data)
+static gpointer _camera_msg_recv_func(gpointer data)
{
int recv_length = 0;
int single_length = 0;
@@ -1980,6 +1980,11 @@ static void *_camera_msg_recv_func(gpointer data)
if (!cb_info->is_server_connected) {
char *error_msg = NULL;
+ if (cb_info->bufmgr == NULL) {
+ LOGE("No need to send error(handle is not created)");
+ goto CB_HANDLER_EXIT;
+ }
+
if (cb_info->fd < 0) {
LOGE("fd is closed in client side");
goto CB_HANDLER_EXIT;