summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseungha.son <seungha.son@samsung.com>2016-11-01 13:40:37 +0900
committerseungha.son <seungha.son@samsung.com>2016-11-01 14:31:39 +0900
commit2915630b5fbef884044bf376e15fe9cb6b0f0c7d (patch)
tree6fd40acd308b2cfa0fa5dd6510616f125c35910b
parent5ef24e0b67ef879b8e7c155d2d93d9708094449b (diff)
downloadnotification-submit/tizen_3.0/20161102.051512.tar.gz
notification-submit/tizen_3.0/20161102.051512.tar.bz2
notification-submit/tizen_3.0/20161102.051512.zip
Signed-off-by: seungha.son <seungha.son@samsung.com> Change-Id: If4f6a2f6acb841e84c1d489b22118e0043382ecb
-rw-r--r--src/notification_setting_service.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/notification_setting_service.c b/src/notification_setting_service.c
index a4a3b50..e9adcc3 100644
--- a/src/notification_setting_service.c
+++ b/src/notification_setting_service.c
@@ -632,6 +632,11 @@ EXPORT_API int notification_get_dnd_and_allow_to_notify(const char *pkgname,
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
+ if (row_count == 0) {
+ NOTIFICATION_ERR("Invalid uid [%d] or package name [%s]", uid, pkgname);
+ ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
+ goto out;
+ }
col_index = col_count;
_get_table_field_data_int(query_setting_result, (int *)allow_to_notify, col_index++);
@@ -643,6 +648,11 @@ EXPORT_API int notification_get_dnd_and_allow_to_notify(const char *pkgname,
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
+ if (row_count == 0) {
+ NOTIFICATION_ERR("Invalid uid [%d]", uid);
+ ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
+ goto out;
+ }
col_index = col_count;
_get_table_field_data_int(query_system_setting_result, (int *)do_not_disturb, col_index++);