RETV_IF(NULL == handle, CALENDAR_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == view_uri, CALENDAR_ERROR_INVALID_PARAMETER);
+ RETV_IF(id < 0, CALENDAR_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cal_dbus_object, CALENDAR_ERROR_IPC);
CAL_LIMIT_ACCESS_FRONT(view_uri);
RETV_IF(NULL == handle, CALENDAR_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == record, CALENDAR_ERROR_INVALID_PARAMETER);
+ RETV_IF(id < 0, CALENDAR_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cal_dbus_object, CALENDAR_ERROR_IPC);
CAL_LIMIT_ACCESS_FRONT(((cal_record_s *)record)->view_uri);
RETV_IF(NULL == handle, CALENDAR_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == out_record, CALENDAR_ERROR_INVALID_PARAMETER);
+ RETV_IF(id < 0, CALENDAR_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cal_dbus_object, CALENDAR_ERROR_IPC);
DBG("uri[%s]", view_uri);
/* param start */
char **s = NULL;
s = g_strsplit(p, ";", -1);
- RETVM_IF(NULL == s, p + strlen(p) - len_param, "g_strsplit() Fail");
+ if (NULL == s) {
+ /* LCOV_EXCL_START */
+ ERR("g_strsplit() Fail");
+ return NULL;
+ /* LCOV_EXCL_STOP */
+ }
int count_param = g_strv_length(s);
DBG("count_param(%d)", count_param);
#define CAL_DBUS_SET_STRING(x) (x) ? x : ""
#define CAL_DBUS_GET_STRING(x) do { \
- x = (NULL != x && '\0' != *x) ? strdup(x) : NULL; \
+ x = (NULL != x) ? strdup(x) : NULL; \
} while (0)
GVariant* cal_dbus_utils_null_to_gvariant(void)
switch (filter_type) {
case CAL_FILTER_STR:
g_variant_get(arg_value, "&s", &filter->value.s);
+ CAL_DBUS_GET_STRING(filter->value.s);
break;
case CAL_FILTER_INT:
g_variant_get(arg_value, "i", &filter->value.i);
GVariant *arg_value = NULL;
g_variant_iter_loop(iter_filter, "v", &arg_value);
g_variant_get(arg_value, "&s", &filter->view_uri);
+ CAL_DBUS_GET_STRING(filter->view_uri);
int filter_count = 0;
g_variant_iter_loop(iter_filter, "v", &arg_value);
if (has_filter)
_gvariant_to_filter(arg_filter, q);
+ else
+ q->filter = NULL;
if (count_projection)
_gvariant_to_projection(count_projection, arg_projection, q);
+ else
+ q->projection = NULL;
q->sort_property_id = property_id;
q->properties = (cal_property_info_s *)cal_view_get_property_info(view_uri,
calendar_list_h list = NULL;
ret = cal_db_get_records_with_query(query, offset, limit, &list);
+ calendar_query_destroy(query);
GVariant *arg_list = cal_dbus_utils_list_to_gvariant(list);
cal_dbus_complete_get_records_with_query(object, invocation, arg_list, ret);
int count = 0;
ret = cal_db_get_count_with_query(query, &count);
+ calendar_query_destroy(query);
+
cal_dbus_complete_get_count_with_query(object, invocation, count, ret);
cal_server_ondemand_start();