From 06c78b2cbc4143487b6d29259e9863ade31e210d Mon Sep 17 00:00:00 2001 From: Minh-Quang Nguyen Date: Wed, 8 Jun 2016 16:00:25 -0400 Subject: LC15: revert RTP socket connect sequence Change-Id: I839eaa6fa1442af2eafd4aab47396ba9845bc558 --- src/trau/osmo_ortp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index eb78212..9ab9f3a 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -392,14 +392,15 @@ int osmo_rtp_socket_connect(struct osmo_rtp_socket *rs, const char *ip, uint16_t return 0; } - rc = rtp_session_set_remote_addr(rs->sess, ip, port); - if (rc < 0) - return rc; - /* enable the use of connect() so later getsockname() will * actually return the IP address that was chosen for the local * sid of the connection */ rtp_session_set_connected_mode(rs->sess, 1); + + rc = rtp_session_set_remote_addr(rs->sess, ip, port); + if (rc < 0) + return rc; + rs->flags &= ~OSMO_RTP_F_DISABLED; if (rs->flags & OSMO_RTP_F_POLL) -- cgit v1.2.3