Merge
This commit is contained in:
6
Rakefile
6
Rakefile
@@ -1,6 +1,9 @@
|
|||||||
require 'rake_utils/debian'
|
require 'rake_utils/debian'
|
||||||
include RakeUtils::DSL
|
include RakeUtils::DSL
|
||||||
|
|
||||||
|
DEBUG = ENV.has_key?('DEBUG') &&
|
||||||
|
%w|yes y ok 1 true t|.include?(ENV['DEBUG'])
|
||||||
|
|
||||||
ALL_SOURCES =FileList['src/*']
|
ALL_SOURCES =FileList['src/*']
|
||||||
SOURCES = ALL_SOURCES.select { |c| c =~ /\.c$/ }
|
SOURCES = ALL_SOURCES.select { |c| c =~ /\.c$/ }
|
||||||
OBJECTS = SOURCES.pathmap( "%{^src,build}X.o" )
|
OBJECTS = SOURCES.pathmap( "%{^src,build}X.o" )
|
||||||
@@ -12,7 +15,7 @@ LIBCHECK = "/usr/lib/libcheck.a"
|
|||||||
|
|
||||||
TEST_MODULES = Dir["tests/check_*.c"].map { |n| n[12..-3] }
|
TEST_MODULES = Dir["tests/check_*.c"].map { |n| n[12..-3] }
|
||||||
|
|
||||||
if ENV['DEBUG']
|
if DEBUG
|
||||||
LDFLAGS << ["-g"]
|
LDFLAGS << ["-g"]
|
||||||
CCFLAGS << ["-g -DDEBUG"]
|
CCFLAGS << ["-g -DDEBUG"]
|
||||||
end
|
end
|
||||||
@@ -87,3 +90,4 @@ namespace :pkg do
|
|||||||
t.generate_changelog!
|
t.generate_changelog!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -15,6 +15,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
|
||||||
static const int block_allocation_resolution = 4096;//128<<10;
|
static const int block_allocation_resolution = 4096;//128<<10;
|
||||||
|
|
||||||
static inline void dirty(struct mode_serve_params *serve, off64_t from, int len)
|
static inline void dirty(struct mode_serve_params *serve, off64_t from, int len)
|
||||||
@@ -383,6 +386,11 @@ void serve_open_server_socket(struct mode_serve_params* params)
|
|||||||
"Couldn't set SO_REUSEADDR"
|
"Couldn't set SO_REUSEADDR"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
SERVER_ERROR_ON_FAILURE(
|
||||||
|
setsockopt(params->server, IPPROTO_TCP, TCP_NODELAY, &optval, sizeof(optval)),
|
||||||
|
"Couldn't set TCP_NODELAY"
|
||||||
|
);
|
||||||
|
|
||||||
SERVER_ERROR_ON_FAILURE(
|
SERVER_ERROR_ON_FAILURE(
|
||||||
bind(params->server, ¶ms->bind_to.generic,
|
bind(params->server, ¶ms->bind_to.generic,
|
||||||
sizeof(params->bind_to)),
|
sizeof(params->bind_to)),
|
||||||
|
Reference in New Issue
Block a user