Commit e2752da3 authored by Dafydd Harries's avatar Dafydd Harries

add const qualifier to various things

darcs-hash:20070210124942-c9803-9cf881ad1149d817d155d6ae9948259b41b8950a.gz
parent ca4ca81d
...@@ -27,7 +27,7 @@ nice_address_set_ipv4 (NiceAddress *addr, guint32 addr_ipv4) ...@@ -27,7 +27,7 @@ nice_address_set_ipv4 (NiceAddress *addr, guint32 addr_ipv4)
* Returns FALSE on error. * Returns FALSE on error.
*/ */
gboolean gboolean
nice_address_set_ipv4_from_string (NiceAddress *addr, gchar *str) nice_address_set_ipv4_from_string (NiceAddress *addr, const gchar *str)
{ {
struct in_addr iaddr; struct in_addr iaddr;
......
...@@ -42,7 +42,7 @@ nice_address_set_ipv4 (NiceAddress *addr, guint32 addr_ipv4); ...@@ -42,7 +42,7 @@ nice_address_set_ipv4 (NiceAddress *addr, guint32 addr_ipv4);
G_GNUC_WARN_UNUSED_RESULT G_GNUC_WARN_UNUSED_RESULT
gboolean gboolean
nice_address_set_ipv4_from_string (NiceAddress *addr, gchar *str); nice_address_set_ipv4_from_string (NiceAddress *addr, const gchar *str);
gboolean gboolean
nice_address_equal (NiceAddress *a, NiceAddress *b); nice_address_equal (NiceAddress *a, NiceAddress *b);
......
...@@ -41,7 +41,7 @@ void ...@@ -41,7 +41,7 @@ void
nice_rng_generate_bytes_print (NiceRNG *rng, guint len, gchar *buf) nice_rng_generate_bytes_print (NiceRNG *rng, guint len, gchar *buf)
{ {
guint i; guint i;
gchar *chars = const gchar *chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz" "abcdefghijklmnopqrstuvwxyz"
"01234567890"; "01234567890";
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#include <stun.h> #include <stun.h>
static gchar *server = "stun.fwdnet.net"; static const gchar *server = "stun.fwdnet.net";
const guint port = 3478; static guint port = 3478;
static gboolean static gboolean
resolve (const gchar *name, struct hostent *ret) resolve (const gchar *name, struct hostent *ret)
......
...@@ -38,7 +38,7 @@ socket_send ( ...@@ -38,7 +38,7 @@ socket_send (
NiceUDPSocket *sock, NiceUDPSocket *sock,
NiceAddress *to, NiceAddress *to,
guint len, guint len,
gchar *buf) const gchar *buf)
{ {
struct sockaddr_in sin; struct sockaddr_in sin;
......
...@@ -46,7 +46,7 @@ fake_send ( ...@@ -46,7 +46,7 @@ fake_send (
NiceUDPSocket *sock, NiceUDPSocket *sock,
NiceAddress *to, NiceAddress *to,
guint len, guint len,
gchar *buf) const gchar *buf)
{ {
Packet *packet; Packet *packet;
UDPFakeSocketPriv *priv; UDPFakeSocketPriv *priv;
......
...@@ -35,7 +35,7 @@ nice_udp_socket_send ( ...@@ -35,7 +35,7 @@ nice_udp_socket_send (
NiceUDPSocket *sock, NiceUDPSocket *sock,
NiceAddress *to, NiceAddress *to,
guint len, guint len,
gchar *buf) const gchar *buf)
{ {
sock->send (sock, to, len, buf); sock->send (sock, to, len, buf);
} }
......
...@@ -15,7 +15,7 @@ struct _NiceUDPSocket ...@@ -15,7 +15,7 @@ struct _NiceUDPSocket
gint (*recv) (NiceUDPSocket *sock, NiceAddress *from, guint len, gint (*recv) (NiceUDPSocket *sock, NiceAddress *from, guint len,
gchar *buf); gchar *buf);
gboolean (*send) (NiceUDPSocket *sock, NiceAddress *to, guint len, gboolean (*send) (NiceUDPSocket *sock, NiceAddress *to, guint len,
gchar *buf); const gchar *buf);
void (*close) (NiceUDPSocket *sock); void (*close) (NiceUDPSocket *sock);
void *priv; void *priv;
}; };
...@@ -61,7 +61,7 @@ nice_udp_socket_send ( ...@@ -61,7 +61,7 @@ nice_udp_socket_send (
NiceUDPSocket *sock, NiceUDPSocket *sock,
NiceAddress *to, NiceAddress *to,
guint len, guint len,
gchar *buf); const gchar *buf);
void void
nice_udp_socket_close (NiceUDPSocket *sock); nice_udp_socket_close (NiceUDPSocket *sock);
......
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