summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-03-10 23:48:26 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-03-10 23:48:26 +0000
commit5dd04bfa79b6c656f7d7662bd96a657f467d1a86 (patch)
tree38200105c0262488ea50cf959dd9bd25c72fa127
parent2a5270a5406335a6ba55ddf3a6cf31ab24622964 (diff)
Fix parameter order on memset
-rw-r--r--hcid/dbus-common.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c
index 360501e0..32e750dd 100644
--- a/hcid/dbus-common.c
+++ b/hcid/dbus-common.c
@@ -112,7 +112,7 @@ static int name_data_add(const char *name, name_cb_t func, void *user_data)
if (!data)
goto failed;
- memset(data, sizeof(struct name_data), 0);
+ memset(data, 0, sizeof(struct name_data));
data->name = strdup(name);
if (!data->name)
@@ -165,6 +165,8 @@ static DBusHandlerResult name_exit_filter(DBusConnection *connection,
"NameOwnerChanged"))
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ debug("name_exit_filter");
+
if (!dbus_message_get_args(message, NULL,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_STRING, &old,
@@ -225,8 +227,11 @@ int name_listener_add(DBusConnection *connection, const char *name,
dbus_error_init(&err);
dbus_bus_add_match(connection, match_string, &err);
+ debug("match rule \"%s\" added", match_string);
+
if (dbus_error_is_set(&err)) {
- error("Adding owner match rule for %s failed: %s", name, err.message);
+ error("Adding match rule \"%s\" failed: %s", match_string,
+ err.message);
dbus_error_free(&err);
name_data_remove(name, func, user_data);
return -1;