summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/samba/files/samba3.4.0-recvfile.patch
blob: c5c9097a5fe818015c02725f33a70bcd5e81f7d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: samba-3.4.0/source3/lib/recvfile.c
===================================================================
--- samba-3.4.0.orig/source3/lib/recvfile.c	2010-10-27 16:12:44.000000000 +0800
+++ samba-3.4.0/source3/lib/recvfile.c	2010-12-24 16:37:59.000000000 +0800
@@ -160,6 +160,12 @@
 	}
 
 	/*
+	 * Receive file in kernel space, splice should support
+	 * from socket to file.
+	 */
+	return splice(fromfd, NULL, tofd, &offset, count, SPLICE_F_MOVE);
+
+	/*
 	 * Older Linux kernels have splice for sendfile,
 	 * but it fails for recvfile. Ensure we only try
 	 * this once and always fall back to the userspace