neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/30113 )


Change subject: rtp_stream: set_remote_addr: do nothing when unchanged
......................................................................

rtp_stream: set_remote_addr: do nothing when unchanged

Change-Id: I15181d84f3eb8a4ab9077cf12fcb138d51733102
---
M src/libmsc/rtp_stream.c
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/13/30113/1

diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c
index c86d0be..61b5ea9 100644
--- a/src/libmsc/rtp_stream.c
+++ b/src/libmsc/rtp_stream.c
@@ -398,6 +398,11 @@

 void rtp_stream_set_remote_addr(struct rtp_stream *rtps, const struct 
osmo_sockaddr_str *r)
 {
+       if (osmo_sockaddr_str_cmp(&rtps->remote, r) == 0) {
+               LOG_RTPS(rtps, LOGL_DEBUG, "remote addr already " 
OSMO_SOCKADDR_STR_FMT ", no change\n",
+                        OSMO_SOCKADDR_STR_FMT_ARGS(r));
+               return;
+       }
        if (rtps->fi->state == RTP_STREAM_ST_ESTABLISHED)
                rtp_stream_state_chg(rtps, RTP_STREAM_ST_ESTABLISHING);
        LOG_RTPS(rtps, LOGL_DEBUG, "setting remote addr to " 
OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(r));

--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/30113
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I15181d84f3eb8a4ab9077cf12fcb138d51733102
Gerrit-Change-Number: 30113
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-MessageType: newchange

Reply via email to