summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-03-12 19:25:52 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-03-12 19:25:52 +0000
commitbf8b147f99d4c7be3d03a55c4889e7b5970c94e6 (patch)
tree57bcf6d5e925fab5e54b83ce7d2fdb31e563df84
parentadb009d7bc98c936cfdb3fad1eec994c94bdaa31 (diff)
Even more cleanups
-rw-r--r--hcid/dbus-common.c3
-rw-r--r--hcid/dbus-security.c13
2 files changed, 9 insertions, 7 deletions
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c
index 2489c9a7..74e4ecda 100644
--- a/hcid/dbus-common.c
+++ b/hcid/dbus-common.c
@@ -127,8 +127,10 @@ done:
failed:
if (data)
name_data_free(data);
+
if (cb)
free(cb);
+
return 0;
}
@@ -297,4 +299,3 @@ service_handler_func_t find_service_handler(struct service_data *handlers, DBusM
return NULL;
}
-
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index bbc82871..e06be1a4 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -3,6 +3,7 @@
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2004-2006 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2005-2006 Johan Hedberg <johan.hedberg@nokia.com>
*
*
* This program is free software; you can redistribute it and/or modify
@@ -27,6 +28,7 @@
#include <stdio.h>
#include <errno.h>
+#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
@@ -37,7 +39,7 @@
#include "dbus.h"
#include "hcid.h"
-#define TIMEOUT (30 * 1000) /* 30 seconds */
+#define TIMEOUT (30 * 1000) /* 30 seconds */
struct pin_request {
int dev;
@@ -52,7 +54,7 @@ static void default_agent_exited(const char *name, void *data)
debug("%s exited without unregistering the default passkey agent", name);
if (!default_agent || strcmp(name, default_agent->name)) {
- /* This should never happen (there's a bug in the code if it does */
+ /* This should never happen (there's a bug in the code if it does) */
debug("default_agent_exited: mismatch with actual default_agent");
return;
}
@@ -241,11 +243,11 @@ static int call_passkey_agent(struct passkey_agent *agent, int dev, const char *
goto failed;
}
- debug("Calling PasskeyAgent.Request: name=%s, path=%s", agent->name,
- agent->path);
+ debug("Calling PasskeyAgent.Request: name=%s, path=%s",
+ agent->name, agent->path);
message = dbus_message_new_method_call(agent->name, agent->path,
- "org.bluez.PasskeyAgent", "Request");
+ "org.bluez.PasskeyAgent", "Request");
if (message == NULL) {
error("Couldn't allocate D-Bus message");
goto failed;
@@ -302,4 +304,3 @@ int call_default_passkey_agent(int dev, const char *path, bdaddr_t *sba, bdaddr_
{
return call_passkey_agent(default_agent, dev, path, sba, dba);
}
-