Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 2b7c3b21 authored by Davide Pala's avatar Davide Pala

Merge branch 'master' of gitlab.inria.fr:srokicki/Comet

Removed unused variables
parents 40fd3239 9e0d2839
......@@ -2,7 +2,6 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string>
#include <sys/sendfile.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
......@@ -230,10 +229,11 @@ ElfFile* ElfFile::copy(char* newDest)
// sendfile will work with non-socket output (i.e. regular file) on
// Linux 2.6.33+
off_t bytesCopied = 0;
struct stat fileinfo = {0};
fstat(input, &fileinfo);
sendfile(output, input, &bytesCopied, fileinfo.st_size);
// This is dead code, will NOT compile on OSX
// off_t bytesCopied = 0;
// struct stat fileinfo = {0};
// fstat(input, &fileinfo);
// sendfile(output, input, &bytesCopied, fileinfo.st_size);
close(input);
close(output);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment