Make the patch for master branch, 4.0 doesn't take any new feature and I applied the patches to master branch anyhow.
Also, do not forget the patch for xml documentation.
Cheers, Daniel
Patch for master branch is in the attachment.
Changelog: - documentation is updated - tcpconn_id initialized to "-1" for contacts loaded from a database during startup (Write-Back & Write-Through database modes). - tcpconn_id is being updated when UA reconnects and refreshes its registration.