Various cleanups in transport_session.c: