summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-12-03 20:45:46 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-12-08 16:10:58 +0200
commit716ec2c6433e73509f4349a5402b5c7989d66e39 (patch)
treedf36fa1ab4aa534e852df723662b8aaf029cab72 /audio
parent41aebf977cb30ab848a95674f39ed4513517837e (diff)
Fix HAL PropertyModified signal parsing
Diffstat (limited to 'audio')
-rw-r--r--audio/telephony-maemo.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/audio/telephony-maemo.c b/audio/telephony-maemo.c
index e4ff5297..208df5fe 100644
--- a/audio/telephony-maemo.c
+++ b/audio/telephony-maemo.c
@@ -1219,6 +1219,8 @@ static void handle_hal_property_modified(DBusMessage *msg)
hal_get_integer(path, name, &battchg_max);
else if (g_str_equal(name, "battery.charge_level.current"))
hal_get_integer(path, name, &battchg);
+
+ dbus_message_iter_next(&array);
}
}
@@ -1229,11 +1231,6 @@ static DBusHandlerResult signal_filter(DBusConnection *conn,
const char *member = dbus_message_get_member(msg);
const char *path = dbus_message_get_path(msg);
- if (dbus_message_get_type(msg) != DBUS_MESSAGE_TYPE_SIGNAL ||
- !(g_str_has_prefix(interface, CSD_CALL_INTERFACE) ||
- g_str_equal(interface, NETWORK_INTERFACE)))
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-
debug("telephony-maemo: received %s %s.%s", path, interface, member);
if (dbus_message_is_signal(msg, CSD_CALL_INTERFACE, "Coming"))
@@ -1508,7 +1505,7 @@ static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
DBusMessage *reply;
DBusMessageIter iter, sub;;
const char *path;
- char match_string[128];
+ char match_string[256];
int type;
reply = dbus_pending_call_steal_reply(call);
@@ -1542,8 +1539,10 @@ static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
debug("telephony-maemo: found battery device at %s", path);
snprintf(match_string, sizeof(match_string),
- "type=signal,interface=org.freedesktop.Hal.Device,"
- "path=%s,member=PropertyModified", path);
+ "type='signal',"
+ "path='%s',"
+ "interface='org.freedesktop.Hal.Device',"
+ "member='PropertyModified'", path);
dbus_bus_add_match(connection, match_string, NULL);
hal_get_integer(path, "battery.charge_level.last_full", &battchg_max);