138 Commits

Author SHA1 Message Date
cc0967510b Add logging when loop callback hit time threshold. Remove some unused function, remove undefined function (only defined in header) 2017-05-30 12:12:32 +02:00
7db9c4354e Removed non-renetrant version of iptoa()
Mass-change. Many places it could have been done in a better way (eg. calculate nice name for UdpSlot peer once and not for every log line).
2017-05-10 17:54:00 +02:00
45ad44939a Catch std::bad_alloc and not '...' 2017-05-07 20:51:33 +02:00
1c117d3aa1 Dropped PingInfo + PingServer entierely.
The remaining functionality of the pingserver was to ping normalt and "shotgun" IPs to determine the fastests and working network path. This is better done at L2/L3 or OS level - not in the application.

The email-sending functionality was dropped too. We recommend using 3rd-party tools for monitoring and statistics-collection/triggering.
2017-05-05 15:00:31 +02:00
4cdd726df0 Make statistics variable atomic 2017-05-01 18:09:40 +02:00
1dc77e8ec3 Removed PingInfo::m_socketsClosedFromHittingLimit
Also removed Stats::m_closedSockets, and moved dumping to Statistics.cpp
2017-05-01 12:08:24 +02:00
118a959fcb Free m_hostname when destroying tcp socket 2017-04-03 20:55:24 +02:00
19e6907d79 unwrap call to PingServer::sendEmailMsg 2017-04-03 13:42:19 +02:00
50a7bd8677 const for getMsgSize() 2017-03-10 11:52:34 +01:00
ef22f6eb86 Fix indentation 2017-02-03 14:03:29 +01:00
a2e2dbb9d6 More valgrind suppression for SSL 2017-01-30 13:49:13 +01:00
613a54c4cc Don't take address of arrays 2017-01-10 01:01:52 +01:00
f97edaa438 Slightly better log in TcpServer 2016-12-02 14:07:52 +01:00
ae98efc504 Removed write-only member TcpSocket::m_prefLevel 2016-12-01 17:25:05 +01:00
9e900f68dd Removed write-only member TcpSocket::m_shutdownStart 2016-12-01 17:04:49 +01:00
5b5e164ff5 Turned goto-loop into regular loop in TcpServer::readSocket() 2016-12-01 16:44:00 +01:00
ba3a11afef Remvoed got from TcpServer::init() 2016-12-01 16:35:23 +01:00
15adeb1251 remoed more gotos
Reworked TcpServer::connectSocket() somewhat
2016-12-01 16:28:40 +01:00
4ceb8c67ba Remove more EINTR goto-retry 2016-12-01 16:02:33 +01:00
f369b80902 Removed unnecessary EINTR goto-retry
EINTR can happen upon any signal. valgrind just makes it more likely. The workaround is no longer ncessary because caught signals are now marked with SA_RESTART in Loop.cpp
2016-12-01 15:55:06 +01:00
7cee4ea8e3 Fix clang unreachable code warnings 2016-11-22 15:36:54 +01:00
6502541baf Make local functions static 2016-11-19 15:20:00 +01:00
d52dabc828 #include cleanup of Url.h 2016-11-12 20:01:44 +01:00
8a41de798f #include cleanup og MsgC.h 2016-11-12 19:43:59 +01:00
e11ae73a26 null-check before use, bool / char handling fix, safer string handling in TcpServer 2016-10-21 19:51:03 +02:00
bbe348c893 init class members in TcpServer 2016-10-02 09:41:19 +02:00
c6103f759b avoid potential int overflow before assignment in TcpServer::closeLeastUsed 2016-09-30 23:27:18 +02:00
0a0ed22110 check s->m_readBuf for null before use in readSocketWrapper2 2016-09-30 15:50:45 +02:00
0946500e7a init class members in TcpServer 2016-09-30 15:07:15 +02:00
91d2dfcd2d #include cleanup in Profiler.* 2016-08-31 19:07:23 +02:00
7d60a170a4 Removed useless code 2016-08-19 15:52:53 +02:00
5ba9dbc4fd Removed quickpoll functionality from Loop
All heavy tasks should be offloaded to threads so quickpolls (which we disabled many moons ago) are unnecessary.
2016-08-11 18:38:04 +02:00
c2a7663763 Removed some asses from UdpServer 2016-08-11 17:22:06 +02:00
53b3ce79da #include cleanup of TcpServer.h 2016-08-10 18:31:52 +02:00
65b9b02fba Replace use of g_hostdb.m_numHosts with g_hostdb.getNumHosts() 2016-08-05 14:56:11 +02:00
4e4e3371e6 Log function will now return void instead of a boolean 2016-08-01 18:12:10 +02:00
8eb47379a6 Ignore SIGPIPE 2016-07-29 12:00:01 +02:00
d6ac4f567c Removed global variable g_inMemFunction
The updates to it were incomplete (eg more functions in openssl calls malloc(). Since we have disabled quickpolls the only two cases that remain are signal handlers (sigsegv/sigbus/...) and the profiler signal handler. For regular signal handlers we just take a chance. For profiler it only calls backtrace() which does use heap.
2016-07-28 18:13:26 +02:00
40412c5d45 Use EMFILE instead of 24 & E2BIG instead of 7 2016-06-29 17:16:53 +02:00
f3f5eefcb6 First batch of changes streamlining emergency shutdown code 2016-06-20 12:30:26 +02:00
a908e4a6e9 Add constness to getHostFast 2016-06-01 15:35:25 +02:00
023673fab0 Fix conversion from string literal to 'char *' for Conf, Msg12, Msg3, MsgC, Parms, PingServer, Rdb, RdbBase, RdbBuckets, TcpServer, XmlDoc 2016-05-31 11:26:02 +02:00
b3248b7556 Fix conversion from string literal to 'char *' for TcpServer 2016-05-31 11:26:01 +02:00
d40ecb2f8e Replace INT32/INT64 and likes with PRId32 and likes. Add space before definition. 2016-05-20 09:18:32 +02:00
e0eb47a840 Remove commented out log("hey") 2016-05-10 16:15:33 +02:00
96ab75be1d Moved MAX_NICENESS from Threads.h to a separate max_niceness.h file 2016-04-28 14:28:14 +02:00
9a0352713f Removed global g_inSigHandler
And assocated code. The variable was always false since we elimated the SIGALRM
quickpoll stuff.
2016-04-21 17:37:10 +02:00
9819f64b4b cleanup: unused variable assignments 2016-03-14 22:06:14 +01:00
d84b84d36c Clear sockaddr_in variables correctly
bzero() of &sa.sin_zero was flagged as suspicious because it is an array.
Changed to memset()ing the whole structure as it is traditionally done which
also ensures that any padding or unknown fields are cleared.
2016-03-07 22:56:13 +01:00
501701ea49 Cast from sockaddr_in* to sockaddr* via a void* to suppress compiler+flexelint warnings 2016-03-07 10:53:32 +01:00