summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-09-01 17:22:42 -0300
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-09-01 17:23:27 -0300
commit710caac17aa306c94378ce4d4cf08068138a9434 (patch)
tree0e65094f7c01c09ab4b6f172f06b617613c0cf45
parent676f5e7dea3c6c160ffdf08d42bf83e72a5a6c3f (diff)
Network: Minor cleanup
-rw-r--r--network/common.c1
-rw-r--r--network/common.h2
-rw-r--r--network/connection.c8
-rw-r--r--network/manager.c14
-rw-r--r--network/manager.h6
-rw-r--r--network/server.c14
6 files changed, 5 insertions, 40 deletions
diff --git a/network/common.c b/network/common.c
index 151e4810..dd901706 100644
--- a/network/common.c
+++ b/network/common.c
@@ -32,7 +32,6 @@
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <sys/stat.h>
#include <sys/wait.h>
#include <net/if.h>
diff --git a/network/common.h b/network/common.h
index cc154471..f00b4451 100644
--- a/network/common.h
+++ b/network/common.h
@@ -21,8 +21,6 @@
*
*/
-#define MAX_PATH_LENGTH 64 /* D-Bus path */
-
#define PANU_UUID "00001115-0000-1000-8000-00805f9b34fb"
#define NAP_UUID "00001116-0000-1000-8000-00805f9b34fb"
#define GN_UUID "00001117-0000-1000-8000-00805f9b34fb"
diff --git a/network/connection.c b/network/connection.c
index c61eb49c..16d3e383 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -28,29 +28,21 @@
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/param.h>
#include <netinet/in.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include <bluetooth/l2cap.h>
#include <bluetooth/bnep.h>
#include <bluetooth/sdp.h>
#include <glib.h>
#include <gdbus.h>
-#include "../src/dbus-common.h"
-
#include "logging.h"
-#include "textfile.h"
#include "glib-helper.h"
#include "error.h"
#include "common.h"
-#include "connection.h"
#define NETWORK_PEER_INTERFACE "org.bluez.network.Peer"
diff --git a/network/manager.c b/network/manager.c
index 7cbf8220..8067b821 100644
--- a/network/manager.c
+++ b/network/manager.c
@@ -25,34 +25,24 @@
#include <config.h>
#endif
-#include <errno.h>
-#include <ctype.h>
-#include <dirent.h>
-
-#include <sys/stat.h>
-
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
#include <bluetooth/bnep.h>
#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
#include <glib.h>
#include <gdbus.h>
#include "logging.h"
-#include "textfile.h"
-#include "glib-helper.h"
#include "adapter.h"
#include "device.h"
-#include "error.h"
#include "bridge.h"
#include "manager.h"
#include "common.h"
-
-#define MAX_NAME_SIZE 256
+#include "connection.h"
+#include "server.h"
static struct network_conf *conf = NULL;/* Network service configuration */
diff --git a/network/manager.h b/network/manager.h
index 9b16c2a3..455b0963 100644
--- a/network/manager.h
+++ b/network/manager.h
@@ -21,12 +21,6 @@
*
*/
-#include "connection.h"
-#include "server.h"
-
-#define MAX_PATH_LENGTH 64 /* D-Bus path */
-#define NETWORK_PATH "/org/bluez/network"
-
struct network_conf {
gboolean connection_enabled;
gboolean server_enabled;
diff --git a/network/server.c b/network/server.c
index 3fa99d25..00e8f0aa 100644
--- a/network/server.c
+++ b/network/server.c
@@ -29,18 +29,13 @@
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <net/if.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
#include <bluetooth/bnep.h>
#include <bluetooth/l2cap.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
-
#include <netinet/in.h>
#include <glib.h>
@@ -51,19 +46,16 @@
#include "logging.h"
#include "error.h"
-#include "textfile.h"
#include "sdpd.h"
#include "glib-helper.h"
+#include "bridge.h"
+#include "common.h"
+
#define NETWORK_PEER_INTERFACE "org.bluez.network.Peer"
#define NETWORK_HUB_INTERFACE "org.bluez.network.Hub"
#define NETWORK_ROUTER_INTERFACE "org.bluez.network.Router"
#define SETUP_TIMEOUT 1000
-#define MAX_SETUP_ATTEMPTS 3
-
-#include "bridge.h"
-#include "common.h"
-#include "manager.h"
/* Pending Authorization */
struct setup_session {