subsc_id = g_dbus_connection_signal_subscribe(connection,
"org.freedesktop.DBus", "org.freedesktop.DBus",
"NameOwnerChanged", "/org/freedesktop/DBus", NULL,
- G_DBUS_SIGNAL_FLAGS_NONE, __on_bus_name_owner_changed, NULL, NULL);
+ G_DBUS_SIGNAL_FLAGS_NONE, __on_bus_name_owner_changed,
+ NULL, NULL);
if (subsc_id == 0) {
LOGE("Subscribing to signal for invoking callback is failed.");
g_object_unref(connection);
return false;
}
- introspection_data = g_dbus_node_info_new_for_xml(introspection_xml, &error);
+ introspection_data = g_dbus_node_info_new_for_xml(introspection_xml,
+ &error);
if (!introspection_data) {
- LOGE("g_dbus_node_info_new_for_xml error(%s)", error->message);
+ LOGE("g_dbus_node_info_new_for_xml error(%s)",
+ error ? error->message : "");
g_object_unref(connection);
- g_error_free(error);
+ g_clear_error(&error);
return false;
}
&interface_vtable,
NULL, NULL, &error);
if (reg_id == 0) {
- LOGE("g_dbus_connection_register_object error(%s)", error->message);
+ LOGE("g_dbus_connection_register_object error(%s)",
+ error ? error->message : "");
g_dbus_node_info_unref(introspection_data);
g_object_unref(connection);
- g_error_free(error);
+ g_clear_error(&error);
+ return false;
}
owner_id = g_bus_own_name_on_connection(connection,
base_info.mode.u_interval.day_of_week = mode_day_of_week;
base_info.mode.repeat = (alarm_repeat_mode_t)mode_repeat;
+ base_info.msec = 0;
base_info.alarm_type = alarm_type;
base_info.reserved_info = reserved_info;
base_info.mode.u_interval.day_of_week = mode_day_of_week;
base_info.mode.repeat = (alarm_repeat_mode_t)mode_repeat;
+ base_info.msec = 0;
base_info.alarm_type = alarm_type;
base_info.reserved_info = reserved_info;
base_info.mode.u_interval.interval = mode_interval;
base_info.mode.repeat = (alarm_repeat_mode_t)mode_repeat;
+ base_info.msec = 0;
base_info.alarm_type = alarm_type;
base_info.reserved_info = reserved_info;
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016 - 2022 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <stdio.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>