diff options
author | Max <msuraev@sysmocom.de> | 2016-04-29 12:39:35 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-04-29 12:54:38 +0200 |
commit | 8c119f7a0510b75e7fa1b96a37f2a6650e13824f (patch) | |
tree | 42f2f74d7653b7d870cd7ddfeb4fb947cb70b7c4 /src/trau/osmo_ortp.c | |
parent | 80f7c0465fd244c26b037aaee92458c8dce86c6e (diff) |
Set connected mode after setting remote address
ortp: according to oRTP documentation rtp_session_set_connected_mode()
uses the address set by rtp_session_set_remote_addr() - move the
function call accordingly.
Fixes: OS#1661
Diffstat (limited to 'src/trau/osmo_ortp.c')
-rw-r--r-- | src/trau/osmo_ortp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 5ab5bf5..3313798 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -390,16 +390,17 @@ int osmo_rtp_socket_connect(struct osmo_rtp_socket *rs, const char *ip, uint16_t "set remote %s:%u\n", ip, port); 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); rs->flags &= ~OSMO_RTP_F_DISABLED; - rc = rtp_session_set_remote_addr(rs->sess, ip, port); - if (rc < 0) - return rc; - if (rs->flags & OSMO_RTP_F_POLL) return rc; else |