From 1e324b3b2e7963eea7509998aaa4fb3fa470979b Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Fri, 24 Aug 2007 20:25:51 +0000 Subject: network: fixed seg fault --- network/server.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'network/server.c') 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 -- cgit