(bug-fix:minor) Erroneously used DCS_DEBUG_TRACE instead of DCS_DEBUG_ASSERT
(bug-fix:major) 'end-of-connection-establishment' event should be triggered only if the connection is really waiting for connection establishment.