for (i = cmp->remote_candidates; i; i = i->next) {
NiceCandidate *candidate = i->data;
- /* note: do not remove the local candidate that is
+ /* note: do not remove the remote candidate that is
* currently part of the 'selected pair', see ICE
* 9.1.1.1. "ICE Restarts" (ID-19) */
if (candidate == cmp->selected_pair.remote) {
NiceSocket *
nice_udp_turn_socket_new (GMainContext *ctx, NiceAddress *addr,
- NiceSocket *base_socket, NiceAddress *server_addr,
- gchar *username, gchar *password,
+ NiceSocket *base_socket, const NiceAddress *server_addr,
+ const gchar *username, const gchar *password,
NiceTurnSocketCompatibility compatibility)
{
UdpTurnPriv *priv;
gsize
nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
NiceAddress *from, gsize len, guint8 *buf,
- NiceAddress *recv_from, guint8 *_recv_buf, gsize recv_len)
+ const NiceAddress *recv_from, const guint8 *_recv_buf, gsize recv_len)
{
UdpTurnPriv *priv = (UdpTurnPriv *) sock->priv;
ChannelBinding *binding = NULL;
union {
- guint8 *u8;
- guint16 *u16;
+ const guint8 *u8;
+ const guint16 *u16;
} recv_buf;
/* In the case of a reliable UDP-TURN-OVER-TCP (which means MS-TURN)
gsize
nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
NiceAddress *from, gsize len, guint8 *buf,
- NiceAddress *recv_from, guint8 *recv_buf, gsize recv_len);
+ const NiceAddress *recv_from, const guint8 *recv_buf, gsize recv_len);
gboolean
nice_udp_turn_socket_set_peer (NiceSocket *sock, NiceAddress *peer);
NiceSocket *
nice_udp_turn_socket_new (GMainContext *ctx, NiceAddress *addr,
- NiceSocket *base_socket, NiceAddress *server_addr,
- gchar *username, gchar *password, NiceTurnSocketCompatibility compatibility);
+ NiceSocket *base_socket, const NiceAddress *server_addr,
+ const gchar *username, const gchar *password,
+ NiceTurnSocketCompatibility compatibility);
void
nice_udp_turn_socket_set_ms_realm(NiceSocket *sock, StunMessage *msg);