[PATCH obexd 1/4] Reverse order of calls in os_reset_session

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

 



This replaces:
service->get/put, mime->open, ..., service->reset, mime->close
logic, with a more appropriate:
service->get/put, mime->open, ..., mime->close, service->reset
---
 src/obex.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/obex.c b/src/obex.c
index d8f4648..938937c 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -284,8 +284,6 @@ static void os_session_mark_aborted(struct obex_session *os)
 static void os_reset_session(struct obex_session *os)
 {
 	os_session_mark_aborted(os);
-	if (os->service && os->service->reset)
-		os->service->reset(os, os->service_data);
 
 	if (os->object) {
 		os->driver->set_io_watch(os->object, NULL, NULL);
@@ -297,6 +295,9 @@ static void os_reset_session(struct obex_session *os)
 			os->driver->remove(os->path);
 	}
 
+	if (os->service && os->service->reset)
+		os->service->reset(os, os->service_data);
+
 	if (os->name) {
 		g_free(os->name);
 		os->name = NULL;
-- 
1.7.4.1

--
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