All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use g_dbus_emit_signal in call-{barring,meter}.c
@ 2010-02-15  7:02 Andrzej Zaborowski
  2010-02-15 21:06 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Andrzej Zaborowski @ 2010-02-15  7:02 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1997 bytes --]

---
 src/call-barring.c |   13 ++-----------
 src/call-meter.c   |   12 ++----------
 2 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/src/call-barring.c b/src/call-barring.c
index e4c39f3..2a04b25 100644
--- a/src/call-barring.c
+++ b/src/call-barring.c
@@ -991,18 +991,9 @@ static void call_barring_incoming_enabled_notify(int idx, void *userdata)
 	struct ofono_call_barring *cb = userdata;
 	DBusConnection *conn = ofono_dbus_get_connection();
 	const char *path = __ofono_atom_get_path(cb->atom);
-	DBusMessage *signal;
-
-	signal = dbus_message_new_signal(path, OFONO_CALL_BARRING_INTERFACE,
-						"IncomingBarringInEffect");
 
-	if (!signal) {
-		ofono_error("Unable to allocate new %s.IncomingBarringInEffect"
-				" signal", OFONO_CALL_BARRING_INTERFACE);
-		return;
-	}
-
-	g_dbus_send_message(conn, signal);
+	g_dbus_emit_signal(conn, path, OFONO_CALL_BARRING_INTERFACE,
+			"IncomingBarringInEffect", DBUS_TYPE_INVALID);
 }
 
 static void call_barring_outgoing_enabled_notify(int idx, void *userdata)
diff --git a/src/call-meter.c b/src/call-meter.c
index 0275778..2b1e6a5 100644
--- a/src/call-meter.c
+++ b/src/call-meter.c
@@ -652,18 +652,10 @@ void ofono_call_meter_changed_notify(struct ofono_call_meter *cm, int new_value)
 void ofono_call_meter_maximum_notify(struct ofono_call_meter *cm)
 {
 	DBusConnection *conn = ofono_dbus_get_connection();
-	DBusMessage *signal;
 	const char *path = __ofono_atom_get_path(cm->atom);
 
-	signal = dbus_message_new_signal(path, OFONO_CALL_METER_INTERFACE,
-						"NearMaximumWarning");
-	if (!signal) {
-		ofono_error("Unable to allocate new %s.NearMaximumWarning "
-				"signal", OFONO_CALL_METER_INTERFACE);
-		return;
-	}
-
-	g_dbus_send_message(conn, signal);
+	g_dbus_emit_signal(conn, path, OFONO_CALL_METER_INTERFACE,
+			"NearMaximumWarning", DBUS_TYPE_INVALID);
 }
 
 int ofono_call_meter_driver_register(const struct ofono_call_meter_driver *d)
-- 
1.6.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Use g_dbus_emit_signal in call-{barring,meter}.c
  2010-02-15  7:02 [PATCH] Use g_dbus_emit_signal in call-{barring,meter}.c Andrzej Zaborowski
@ 2010-02-15 21:06 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2010-02-15 21:06 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

Hi Andrew,

> ---
>  src/call-barring.c |   13 ++-----------
>  src/call-meter.c   |   12 ++----------
>  2 files changed, 4 insertions(+), 21 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-15 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-15  7:02 [PATCH] Use g_dbus_emit_signal in call-{barring,meter}.c Andrzej Zaborowski
2010-02-15 21:06 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.