add code to check func ret for fixing prevent issue
authorHyungdeuk Kim <hd3.kim@samsung.com>
Thu, 1 Aug 2013 07:57:19 +0000 (16:57 +0900)
committerHyungdeuk Kim <hd3.kim@samsung.com>
Thu, 1 Aug 2013 07:57:19 +0000 (16:57 +0900)
packaging/app-core.spec
src/appcore-rotation.c

index dc1799d..5c843f6 100644 (file)
@@ -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
index d3f9a25..4fb934d 100755 (executable)
@@ -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;
                        }