summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpr.jung <pr.jung@samsung.com>2016-03-03 14:00:54 +0900
committerpr.jung <pr.jung@samsung.com>2016-03-03 14:00:54 +0900
commitbe206572248f6d479bb4c147c2144bd1dd9e851e (patch)
tree7948c6fd1a4823c113d92395de6980f791b8ae88 /src
parent703565e91cc797547e66866cfc925aa74ac04daa (diff)
downloadlibsvi-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.c2
-rw-r--r--src/feedback.c2
-rw-r--r--src/vibrator.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/dbus.c b/src/dbus.c
index f013abe..952932d 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -59,7 +59,7 @@ static int append_variant(DBusMessageIter *iter, const char *sig, char *param[])
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &param[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) {