summaryrefslogtreecommitdiff
path: root/pjnath
diff options
context:
space:
mode:
Diffstat (limited to 'pjnath')
-rw-r--r--pjnath/include/pjnath/ice_strans.h8
-rw-r--r--pjnath/src/pjnath/ice_strans.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/pjnath/include/pjnath/ice_strans.h b/pjnath/include/pjnath/ice_strans.h
index 340bf605..d711d951 100644
--- a/pjnath/include/pjnath/ice_strans.h
+++ b/pjnath/include/pjnath/ice_strans.h
@@ -125,10 +125,14 @@ typedef enum pj_ice_strans_op
/** Negotiation */
PJ_ICE_STRANS_OP_NEGOTIATION,
- /** This operatino is used to report failure in keep-alive operation.
+ /** This operation is used to report failure in keep-alive operation.
* Currently it is only used to report TURN Refresh failure.
*/
- PJ_ICE_STRANS_OP_KEEP_ALIVE
+ PJ_ICE_STRANS_OP_KEEP_ALIVE,
+
+ /** IP address change notification from STUN keep-alive operation.
+ */
+ PJ_ICE_STRANS_OP_ADDR_CHANGE
} pj_ice_strans_op;
diff --git a/pjnath/src/pjnath/ice_strans.c b/pjnath/src/pjnath/ice_strans.c
index aee0c39d..66dce88e 100644
--- a/pjnath/src/pjnath/ice_strans.c
+++ b/pjnath/src/pjnath/ice_strans.c
@@ -1640,6 +1640,14 @@ static pj_bool_t stun_on_status(pj_stun_sock *stun_sock,
sizeof(ipaddr), 3)));
sess_init_update(ice_st);
+
+ if (op == PJ_STUN_SOCK_MAPPED_ADDR_CHANGE &&
+ ice_st->cb.on_ice_complete)
+ {
+ (*ice_st->cb.on_ice_complete)(ice_st,
+ PJ_ICE_STRANS_OP_ADDR_CHANGE,
+ status);
+ }
}
}