From 90081b4195433e218b35fd8dd04205a8a96acb97 Mon Sep 17 00:00:00 2001 From: Hyungdeuk Kim Date: Thu, 1 Aug 2013 16:57:19 +0900 Subject: [PATCH] add code to check func ret for fixing prevent issue --- packaging/app-core.spec | 2 +- src/appcore-rotation.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packaging/app-core.spec b/packaging/app-core.spec index dc1799d..5c843f6 100644 --- a/packaging/app-core.spec +++ b/packaging/app-core.spec @@ -1,7 +1,7 @@ Name: app-core Summary: Application basic Version: 1.2 -Release: 47 +Release: 48 Group: Application Framework License: Apache License, Version 2.0 Source0: app-core-%{version}.tar.gz diff --git a/src/appcore-rotation.c b/src/appcore-rotation.c index d3f9a25..4fb934d 100755 --- a/src/appcore-rotation.c +++ b/src/appcore-rotation.c @@ -359,7 +359,7 @@ EXPORT_API int appcore_resume_rotation_cb(void) return rot.wm_rotate->resume_rotation_cb(); } else { - int r; + int r,ret; enum appcore_rm m; _retv_if(rot.callback == NULL, 0); @@ -381,8 +381,10 @@ EXPORT_API int appcore_resume_rotation_cb(void) if (r < 0) { _ERR("sf_start in appcore_internal_sf_start failed: %d", r); - sf_unregister_event(rot.handle, + ret = sf_unregister_event(rot.handle, ACCELEROMETER_EVENT_ROTATION_CHECK); + if (ret < 0) + _ERR("sf_unregister_event failed: %d", ret); rot.cb_set = 0; return -1; } -- 2.7.4