* refactor: remove tr_address_compare()
* refactor: remove tr_address_to_string()
* refactor: remove NUM_TR_AF_INET_TYPES
* refactor: replace tr_sessionGetPublicAddress with tr_session::getPublicAddress()
* refactor: tr_peerIo() takes tr_address by value
* refactor: replace tr_sessionIsAddressBlocked with tr_session::isAddressBlocked()
* refactor: tr_peerMgrAddIncoming now takes tr_address by value
* refactor: replace tr_address_is_valid_for_peers() with tr_address.isValidForPeers()
* refactor: tr_netOpenPeerSocket takes tr_address by value
* refactor: remove tr_generateAllowedSet()
* refactor: setup_sockaddr takes a tr_address by value
* refactor: tr_netBindTCP() takes a tr_address by value
* refactor: tr_dhtAddNode() takes a tr_address by value
* refactor: remove tr_address_from_string()
* refactor: rename tr_address.isValidForPeers() to .isValidPeerAddress()
* refactor: replace tr_address_from_sockaddr_storage() with tr_address::fromSockaddrStorage()
* refactor: minor cleanup to tr_address::readable()
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).
The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
During shutdown, we can stop DHT almost immediately, but need to leave the announcer running for the DHT tracker event=stopped messages. So it doesn't make sense to keep them on the same periodic timer.
update-version-h.sh tries to use {{{svnversion}}} when possible. But when it's not, it looks through the "$Id:" lines in the source file comments and uses the largest version number it finds. The new files tr-dht.[ch] didn't have the line of its $Id: comment formatted in the way update-version-h.sh expected. tr-dht.[ch]'s $Id: line has been homogenized to be like everyone else's...