Merge branch 'master' of git://github.com/janvidar/uhub
This commit is contained in:
commit
e9f0331ca8
@ -69,7 +69,7 @@ size_t net_get_max_sockets()
|
|||||||
struct rlimit limits;
|
struct rlimit limits;
|
||||||
if (getrlimit(RLIMIT_NOFILE, &limits) == 0)
|
if (getrlimit(RLIMIT_NOFILE, &limits) == 0)
|
||||||
{
|
{
|
||||||
return limits.rlim_max;
|
return MIN(limits.rlim_max, 65536);
|
||||||
}
|
}
|
||||||
LOG_ERROR("getrlimit() failed");
|
LOG_ERROR("getrlimit() failed");
|
||||||
return 1024;
|
return 1024;
|
||||||
|
@ -225,7 +225,6 @@ int file_read_lines(const char* file, void* data, file_line_handler_t handler)
|
|||||||
|
|
||||||
if (*start)
|
if (*start)
|
||||||
{
|
{
|
||||||
buf[strlen(start)] = 0;
|
|
||||||
LOG_DUMP("Line: %s", start);
|
LOG_DUMP("Line: %s", start);
|
||||||
if (handler(start, line_count+1, data) < 0)
|
if (handler(start, line_count+1, data) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user