The poller-per-thread feature was broken with a division by zero. Take
the opportunity to rework it and eliminate the poller_map object. Use a
simple array of pollers for media sockets, plus one global poller for
control sockets. In the regular case only one poller is created and
everything points to that poller. In the poller-per-thread case, one
poller per thread is created, plus one poller (also with its own single
thread) for control connections. All control sockets use the single
control poller, while all media sockets get assigned one poller from the
pool in a round-robin fashion.
closes#1801
Change-Id: Iae91a3e10b7206455c6df33b1a472254c700ce21
In the header files follow the rules:
1. Firstly goes ifndef/define construction, then one empty row.
2. Secondly go system headers, so in angle-brackets, then one empty row.
3. If there are important pre-processor definitions, which affect
the following custom file headers, they are added next, then one empty row.
4. Thirdly custom header files, so in double quotes,
then at least one empty row.
5. If there is "xt_RTPENGINE.h", it's mentioned next, but separately,
then one empty row.
6. Then pre-processor definitions, and one empty row before the code.
In some situations it's allowed to step aside from the rules,
when inclusions are dependent on each other, so on specific sequence,
and also possibly on some inline objects definitions.
But, if possible to follow the rules, it should be done.
Change-Id: I6bec69b508653947c04e7785775373d21112eb58
We have long switched to having a single primary global poller, so
there's no point in passing the poller pointer around and storing it in
associated objects. Remove all remnants of non-global pollers.
Change-Id: I5a3fd217d5de51e839e2b04fec7e23643ee83631
All timers have been moved to their dedicated timer threads, making this
mechanism obsolete.
The only victim is the timeout handling for TCP control streams. Since
other TCP streams aren't using timeout handling either, and the TCP
control socket is barely used by anyone, we can live with not having a
dedicated timeout for these streams for now.
Change-Id: I83d9b9a844f4f494ad37b44f5d1312f272beff3f