Commit 0f55beac authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Add const where appropriate

parent 24908209
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
*****************************************************************************/ *****************************************************************************/
struct network_socket_t struct network_socket_t
{ {
char * psz_bind_addr; const char *psz_bind_addr;
int i_bind_port; int i_bind_port;
char * psz_server_addr; const char *psz_server_addr;
int i_server_port; int i_server_port;
int i_ttl; int i_ttl;
...@@ -322,7 +322,7 @@ VLC_EXPORT( int *, __net_ListenTCP, ( vlc_object_t *, const char *, int ) ); ...@@ -322,7 +322,7 @@ VLC_EXPORT( int *, __net_ListenTCP, ( vlc_object_t *, const char *, int ) );
VLC_EXPORT( int, __net_Accept, ( vlc_object_t *, int *, mtime_t ) ); VLC_EXPORT( int, __net_Accept, ( vlc_object_t *, int *, mtime_t ) );
#define net_OpenUDP(a, b, c, d, e ) __net_OpenUDP(VLC_OBJECT(a), b, c, d, e) #define net_OpenUDP(a, b, c, d, e ) __net_OpenUDP(VLC_OBJECT(a), b, c, d, e)
VLC_EXPORT( int, __net_OpenUDP, ( vlc_object_t *p_this, char *psz_bind, int i_bind, char *psz_server, int i_server ) ); VLC_EXPORT( int, __net_OpenUDP, ( vlc_object_t *p_this, const char *psz_bind, int i_bind, const char *psz_server, int i_server ) );
VLC_EXPORT( void, net_Close, ( int fd ) ); VLC_EXPORT( void, net_Close, ( int fd ) );
VLC_EXPORT( void, net_ListenClose, ( int *fd ) ); VLC_EXPORT( void, net_ListenClose, ( int *fd ) );
......
...@@ -160,9 +160,9 @@ static int BuildAddr( struct sockaddr_in * p_socket, ...@@ -160,9 +160,9 @@ static int BuildAddr( struct sockaddr_in * p_socket,
*****************************************************************************/ *****************************************************************************/
static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket ) static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
{ {
char * psz_bind_addr = p_socket->psz_bind_addr; const char * psz_bind_addr = p_socket->psz_bind_addr;
int i_bind_port = p_socket->i_bind_port; int i_bind_port = p_socket->i_bind_port;
char * psz_server_addr = p_socket->psz_server_addr; const char * psz_server_addr = p_socket->psz_server_addr;
int i_server_port = p_socket->i_server_port; int i_server_port = p_socket->i_server_port;
int i_handle, i_opt; int i_handle, i_opt;
......
...@@ -502,8 +502,8 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait ) ...@@ -502,8 +502,8 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait )
***************************************************************************** *****************************************************************************
* Open a UDP connection and return a handle * Open a UDP connection and return a handle
*****************************************************************************/ *****************************************************************************/
int __net_OpenUDP( vlc_object_t *p_this, char *psz_bind, int i_bind, int __net_OpenUDP( vlc_object_t *p_this, const char *psz_bind, int i_bind,
char *psz_server, int i_server ) const char *psz_server, int i_server )
{ {
vlc_value_t val; vlc_value_t val;
void *private; void *private;
......
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