[gnome-online-accounts/wip/rishi/libsecret-workaround: 7/10] daemon: Assert that the callbacks have sane arguments
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/wip/rishi/libsecret-workaround: 7/10] daemon: Assert that the callbacks have sane arguments
- Date: Tue, 4 Jul 2017 17:53:38 +0000 (UTC)
commit d247e71f82f38917c042ec83432213da7375f378
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Jul 3 17:25:17 2017 +0200
daemon: Assert that the callbacks have sane arguments
src/daemon/main.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 6e9d549..1ce838e 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -55,6 +55,9 @@ on_name_lost (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
+ g_return_if_fail (connection == NULL || G_IS_DBUS_CONNECTION (connection));
+ g_return_if_fail (name != NULL && name[0] != '\0');
+
g_info ("Lost (or failed to acquire) the name %s on the session message bus", name);
g_main_loop_quit (loop);
}
@@ -64,6 +67,9 @@ on_name_acquired (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
+ g_return_if_fail (G_IS_DBUS_CONNECTION (connection));
+ g_return_if_fail (name != NULL && name[0] != '\0');
+
g_debug ("Acquired the name %s on the session message bus", name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]