Commit cd255bdd authored by Olivier Crête's avatar Olivier Crête

udp-turn: Add some const to internal APIs

parent db05e8b0
...@@ -380,7 +380,7 @@ nice_component_restart (NiceComponent *cmp) ...@@ -380,7 +380,7 @@ nice_component_restart (NiceComponent *cmp)
for (i = cmp->remote_candidates; i; i = i->next) { for (i = cmp->remote_candidates; i; i = i->next) {
NiceCandidate *candidate = i->data; 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 * currently part of the 'selected pair', see ICE
* 9.1.1.1. "ICE Restarts" (ID-19) */ * 9.1.1.1. "ICE Restarts" (ID-19) */
if (candidate == cmp->selected_pair.remote) { if (candidate == cmp->selected_pair.remote) {
......
...@@ -174,8 +174,8 @@ priv_send_data_queue_destroy (gpointer user_data) ...@@ -174,8 +174,8 @@ priv_send_data_queue_destroy (gpointer user_data)
NiceSocket * NiceSocket *
nice_udp_turn_socket_new (GMainContext *ctx, NiceAddress *addr, nice_udp_turn_socket_new (GMainContext *ctx, NiceAddress *addr,
NiceSocket *base_socket, NiceAddress *server_addr, NiceSocket *base_socket, const NiceAddress *server_addr,
gchar *username, gchar *password, const gchar *username, const gchar *password,
NiceTurnSocketCompatibility compatibility) NiceTurnSocketCompatibility compatibility)
{ {
UdpTurnPriv *priv; UdpTurnPriv *priv;
...@@ -1184,7 +1184,7 @@ nice_udp_turn_socket_parse_recv_message (NiceSocket *sock, NiceSocket **from_soc ...@@ -1184,7 +1184,7 @@ nice_udp_turn_socket_parse_recv_message (NiceSocket *sock, NiceSocket **from_soc
gsize gsize
nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock, nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
NiceAddress *from, gsize len, guint8 *buf, 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; UdpTurnPriv *priv = (UdpTurnPriv *) sock->priv;
...@@ -1194,8 +1194,8 @@ nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock, ...@@ -1194,8 +1194,8 @@ nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
ChannelBinding *binding = NULL; ChannelBinding *binding = NULL;
union { union {
guint8 *u8; const guint8 *u8;
guint16 *u16; const guint16 *u16;
} recv_buf; } recv_buf;
/* In the case of a reliable UDP-TURN-OVER-TCP (which means MS-TURN) /* In the case of a reliable UDP-TURN-OVER-TCP (which means MS-TURN)
......
...@@ -59,15 +59,16 @@ nice_udp_turn_socket_parse_recv_message (NiceSocket *sock, NiceSocket **from_soc ...@@ -59,15 +59,16 @@ nice_udp_turn_socket_parse_recv_message (NiceSocket *sock, NiceSocket **from_soc
gsize gsize
nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock, nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
NiceAddress *from, gsize len, guint8 *buf, 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 gboolean
nice_udp_turn_socket_set_peer (NiceSocket *sock, NiceAddress *peer); nice_udp_turn_socket_set_peer (NiceSocket *sock, NiceAddress *peer);
NiceSocket * NiceSocket *
nice_udp_turn_socket_new (GMainContext *ctx, NiceAddress *addr, nice_udp_turn_socket_new (GMainContext *ctx, NiceAddress *addr,
NiceSocket *base_socket, NiceAddress *server_addr, NiceSocket *base_socket, const NiceAddress *server_addr,
gchar *username, gchar *password, NiceTurnSocketCompatibility compatibility); const gchar *username, const gchar *password,
NiceTurnSocketCompatibility compatibility);
void void
nice_udp_turn_socket_set_ms_realm(NiceSocket *sock, StunMessage *msg); nice_udp_turn_socket_set_ms_realm(NiceSocket *sock, StunMessage *msg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment