diff options
Diffstat (limited to 'erts/preloaded/src/prim_file.erl')
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index 6f35162feb..7316e0be99 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -545,7 +545,7 @@ write_file(_, _) -> %sendfile(_,_,_,_,_,_,_,_,_,_) -> % {error, enotsup}; sendfile(#file_descriptor{module = ?MODULE, data = {Port, _}}, - Dest, Offset, Bytes, _ChunkSize, _Headers, _Trailers, + Dest, Offset, Bytes, _ChunkSize, Headers, Trailers, _Nodiskio, _MNowait, _Sync) -> case erlang:port_get_data(Dest) of Data when Data == inet_tcp; Data == inet6_tcp -> @@ -555,8 +555,9 @@ sendfile(#file_descriptor{module = ?MODULE, data = {Port, _}}, 0:8, Offset:64/unsigned, Bytes:64/unsigned, - 0:32/unsigned, - 0:32/unsigned>>]) + (iolist_size(Headers)):32/unsigned, + (iolist_size(Trailers)):32/unsigned>>, + Headers,Trailers]) after ok = inet:lock_socket(Dest,false) end; @@ -564,12 +565,6 @@ sendfile(#file_descriptor{module = ?MODULE, data = {Port, _}}, {error,badarg} end. -get_bit(true) -> - 1; -get_bit(false) -> - 0. - - %%%----------------------------------------------------------------- %%% Functions operating on files without handle to the file. ?DRV. |