From b0e6f48192d44134b596d155428f7fc1eb89b916 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 5 Apr 2011 15:50:38 +0100 Subject: [PATCH 10/15] emit_signal_for_registration: assert that signal headers are all valid This is an assertion, not a return_if_fail, because we already checked the object path in dbus_g_connection_register_g_object and the others in export_signals. After these checks, dbus_message_new_signal can really only fail on OOM. --- dbus/dbus-gobject.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 08ddd0e..678a227 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -2237,6 +2237,10 @@ emit_signal_for_registration (ObjectRegistration *o, DBusMessageIter iter; guint i; + g_assert (g_variant_is_object_path (o->object_path)); + g_assert (g_dbus_is_interface_name (sigclosure->sigiface)); + g_assert (g_dbus_is_member_name (sigclosure->signame)); + signal = dbus_message_new_signal (o->object_path, sigclosure->sigiface, sigclosure->signame); -- 1.7.4.1