summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-08-24 20:25:51 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-08-24 20:25:51 +0000
commit1e324b3b2e7963eea7509998aaa4fb3fa470979b (patch)
treefdf4c0d300f6229df8dd3798040a16c33e09e00f /network
parent558c8c359bdbac0804207d41460b25ea33305195 (diff)
network: fixed seg fault
Diffstat (limited to 'network')
-rw-r--r--network/server.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/network/server.c b/network/server.c
index 22ddda8d..3d17fcd0 100644
--- a/network/server.c
+++ b/network/server.c
@@ -384,9 +384,7 @@ static int authorize_connection(struct network_server *ns)
static gboolean connect_setup_event(GIOChannel *chan,
GIOCondition cond, gpointer data)
{
- DBusConnection *conn = data;
- struct network_server *ns;
- char path[MAX_PATH_LENGTH];
+ struct network_server *ns = data;
struct bnep_setup_conn_req *req;
unsigned char pkt[BNEP_MTU];
gsize n;
@@ -443,14 +441,6 @@ static gboolean connect_setup_event(GIOChannel *chan,
/* Getting source service: considering 2 bytes size */
role = ntohs(bt_get_unaligned((uint16_t *) pservice));
- snprintf(path, MAX_PATH_LENGTH, NETWORK_PATH"/%s", bnep_name(role));
- dbus_connection_get_object_user_data(conn, path, (void *) &ns);
-
- if (ns == NULL || ns->enable == FALSE) {
- response = BNEP_CONN_INVALID_SRC;
- goto reply;
- }
-
/*
* FIXME: Check if the connection already exists. Check if the
* BNEP SPEC allows return "connection not allowed" for this case