summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyungdeuk Kim <hd3.kim@samsung.com>2013-08-01 16:57:19 +0900
committerHyungdeuk Kim <hd3.kim@samsung.com>2013-08-01 16:57:19 +0900
commit90081b4195433e218b35fd8dd04205a8a96acb97 (patch)
tree563a68da783114def0a64ccb80a0ab41bc4bf934
parent2be674f6334542db8b0bc72e957fe4ac37fa944d (diff)
downloadapp-core-90081b4195433e218b35fd8dd04205a8a96acb97.tar.gz
app-core-90081b4195433e218b35fd8dd04205a8a96acb97.tar.bz2
app-core-90081b4195433e218b35fd8dd04205a8a96acb97.zip
add code to check func ret for fixing prevent issue
-rw-r--r--packaging/app-core.spec2
-rwxr-xr-xsrc/appcore-rotation.c6
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;
}