aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/file_io_server.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/src/file_io_server.erl')
-rw-r--r--lib/kernel/src/file_io_server.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/kernel/src/file_io_server.erl b/lib/kernel/src/file_io_server.erl
index 78d3d24394..7280635f53 100644
--- a/lib/kernel/src/file_io_server.erl
+++ b/lib/kernel/src/file_io_server.erl
@@ -249,9 +249,10 @@ file_request(close,
file_request({position,At},
#state{handle=Handle,buf=Buf}=State) ->
std_reply(position(Handle, At, Buf), State);
-file_request({sendfile,DestFD,Offset,Bytes,ChunkSize},
+file_request({sendfile,DestSock,Offset,Bytes,Opts},
#state{handle=Handle}=State) ->
- case ?PRIM_FILE:sendfile(Handle, DestFD, Offset, Bytes, ChunkSize) of
+ %% gen_tcp will call prim_file:sendfile with correct arguments
+ case gen_tcp:sendfile(Handle, DestSock, Offset, Bytes, Opts) of
{error,_}=Reply ->
{stop,normal,Reply,State};
Reply ->