[PATCH obexd 4/9] client: remove unnecessary code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>

No pending requests will exist when session_free is reached, given that
pending transfes always hold a reference to the session.
---
 client/session.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/client/session.c b/client/session.c
index e113d1f..160e015 100644
--- a/client/session.c
+++ b/client/session.c
@@ -179,11 +179,8 @@ static void session_free(struct obc_session *session)
 		obc_agent_free(session->agent);
 	}
 
-	if (session->queue) {
-		g_queue_foreach(session->queue, (GFunc) pending_request_free,
-									NULL);
+	if (session->queue)
 		g_queue_free(session->queue);
-	}
 
 	if (session->watch)
 		g_dbus_remove_watch(session->conn, session->watch);
@@ -200,9 +197,6 @@ static void session_free(struct obc_session *session)
 	if (session->conn)
 		dbus_connection_unref(session->conn);
 
-	if (session->p)
-		pending_request_free(session->p);
-
 	sessions = g_slist_remove(sessions, session);
 
 	g_free(session->path);
-- 
1.7.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux