Pārlūkot izejas kodu

Unplug before sending close() message, to avoid screwing up interfaces

which respond to close with a reopen() (e.g. iSCSI).
tags/v0.9.3
Michael Brown 17 gadus atpakaļ
vecāks
revīzija
4075f7596b
3 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 2
    2
      src/core/job.c
  2. 1
    1
      src/core/resolv.c
  3. 1
    1
      src/core/xfer.c

+ 2
- 2
src/core/job.c Parādīt failu

@@ -29,16 +29,16 @@
29 29
 void job_done ( struct job_interface *job, int rc ) {
30 30
 	struct job_interface *dest = job_get_dest ( job );
31 31
 
32
-	dest->op->done ( dest, rc );
33 32
 	job_unplug ( job );
33
+	dest->op->done ( dest, rc );
34 34
 	job_put ( dest );
35 35
 }
36 36
 
37 37
 void job_kill ( struct job_interface *job ) {
38 38
 	struct job_interface *dest = job_get_dest ( job );
39 39
 
40
-	dest->op->kill ( dest );
41 40
 	job_unplug ( job );
41
+	dest->op->kill ( dest );
42 42
 	job_put ( dest );
43 43
 }
44 44
 

+ 1
- 1
src/core/resolv.c Parādīt failu

@@ -50,8 +50,8 @@ void resolv_done ( struct resolv_interface *resolv, struct sockaddr *sa,
50 50
 		   int rc ) {
51 51
 	struct resolv_interface *dest = resolv_get_dest ( resolv );
52 52
 
53
-	dest->op->done ( dest, sa, rc );
54 53
 	resolv_unplug ( resolv );
54
+	dest->op->done ( dest, sa, rc );
55 55
 	resolv_put ( dest );
56 56
 }
57 57
 

+ 1
- 1
src/core/xfer.c Parādīt failu

@@ -38,8 +38,8 @@ void xfer_close ( struct xfer_interface *xfer, int rc ) {
38 38
 
39 39
 	DBGC ( xfer, "XFER %p->%p close\n", xfer, dest );
40 40
 
41
-	dest->op->close ( dest, rc );
42 41
 	xfer_unplug ( xfer );
42
+	dest->op->close ( dest, rc );
43 43
 	xfer_put ( dest );
44 44
 }
45 45
 

Notiek ielāde…
Atcelt
Saglabāt