diff options
author | pr.jung <pr.jung@samsung.com> | 2016-03-03 14:00:54 +0900 |
---|---|---|
committer | pr.jung <pr.jung@samsung.com> | 2016-03-03 14:00:54 +0900 |
commit | be206572248f6d479bb4c147c2144bd1dd9e851e (patch) | |
tree | 7948c6fd1a4823c113d92395de6980f791b8ae88 /src | |
parent | 703565e91cc797547e66866cfc925aa74ac04daa (diff) | |
download | libsvi-be206572248f6d479bb4c147c2144bd1dd9e851e.tar.gz libsvi-be206572248f6d479bb4c147c2144bd1dd9e851e.tar.bz2 libsvi-be206572248f6d479bb4c147c2144bd1dd9e851e.zip |
Add missing error case
- Permission denied error when app doesn't have privilege
Change-Id: I40b72d7418dfbca2e475e9f71e41a51b772049e3
Signed-off-by: pr.jung <pr.jung@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus.c | 2 | ||||
-rw-r--r-- | src/feedback.c | 2 | ||||
-rw-r--r-- | src/vibrator.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -59,7 +59,7 @@ static int append_variant(DBusMessageIter *iter, const char *sig, char *param[]) dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, ¶m[i]); break; case 'a': - ++i, ++ch; + ++ch; switch (*ch) { case 'y': dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE_AS_STRING, &arr); diff --git a/src/feedback.c b/src/feedback.c index bee3687..b5341ca 100644 --- a/src/feedback.c +++ b/src/feedback.c @@ -176,7 +176,7 @@ API int feedback_play_type(feedback_type_e type, feedback_pattern_e pattern) err = dev->play(pattern); if (err == -ENOTSUP) return FEEDBACK_ERROR_NOT_SUPPORTED; - else if (err == -ECOMM) + else if (err == -ECOMM || err == -EACCES) return FEEDBACK_ERROR_PERMISSION_DENIED; else if (err < 0) return FEEDBACK_ERROR_OPERATION_FAILED; diff --git a/src/vibrator.c b/src/vibrator.c index 5632ad7..f02a575 100644 --- a/src/vibrator.c +++ b/src/vibrator.c @@ -306,7 +306,7 @@ static int vibrator_play(feedback_pattern_e pattern) if (v_handle == -ENOTSUP) { _E("Not supported vibration"); - return -ENOTSUP; + return -EACCES; } if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) < 0) { |