Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
b96f1239
Commit
b96f1239
authored
Sep 08, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing const qualifier and fix warnings
parent
898c8550
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
25 deletions
+27
-25
include/network.h
include/network.h
+7
-7
include/vlc_symbols.h
include/vlc_symbols.h
+7
-7
src/network/io.c
src/network/io.c
+13
-11
No files found.
include/network.h
View file @
b96f1239
...
...
@@ -113,24 +113,24 @@ struct virtual_socket_t
};
#define net_Read(a,b,c,d,e,f) __net_Read(VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT
(
int
,
__net_Read
,
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
vlc_bool_t
b_retry
)
);
VLC_EXPORT
(
int
,
__net_Read
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
vlc_bool_t
b_retry
)
);
#define net_ReadNonBlock(a,b,c,d,e,f) __net_ReadNonBlock(VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT
(
int
,
__net_ReadNonBlock
,
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
)
);
VLC_EXPORT
(
int
,
__net_ReadNonBlock
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
)
);
#define net_Select(a,b,c,d,e,f,g) __net_Select(VLC_OBJECT(a),b,c,d,e,f,g)
VLC_EXPORT
(
int
,
__net_Select
,
(
vlc_object_t
*
p_this
,
int
*
pi_fd
,
v_socket_t
*
*
,
int
i_fd
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
)
);
VLC_EXPORT
(
int
,
__net_Select
,
(
vlc_object_t
*
p_this
,
const
int
*
pi_fd
,
const
v_socket_t
*
const
*
,
int
i_fd
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
)
);
#define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT
(
int
,
__net_Write
,
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
const
uint8_t
*
p_data
,
int
i_data
)
);
VLC_EXPORT
(
int
,
__net_Write
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
uint8_t
*
p_data
,
int
i_data
)
);
#define net_Gets(a,b,c) __net_Gets(VLC_OBJECT(a),b,c)
VLC_EXPORT
(
char
*
,
__net_Gets
,
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
)
);
VLC_EXPORT
(
char
*
,
__net_Gets
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
)
);
VLC_EXPORT
(
int
,
net_Printf
,
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
const
char
*
psz_fmt
,
...
)
);
VLC_EXPORT
(
int
,
net_Printf
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
char
*
psz_fmt
,
...
)
);
#define net_vaPrintf(a,b,c,d,e) __net_vaPrintf(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT
(
int
,
__net_vaPrintf
,
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
const
char
*
psz_fmt
,
va_list
args
)
);
VLC_EXPORT
(
int
,
__net_vaPrintf
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
char
*
psz_fmt
,
va_list
args
)
);
#if !HAVE_INET_PTON
...
...
include/vlc_symbols.h
View file @
b96f1239
...
...
@@ -97,13 +97,13 @@ struct module_symbols_t
int
(
*
__net_Accept_inner
)
(
vlc_object_t
*
,
int
*
,
mtime_t
);
int
(
*
__net_OpenUDP_inner
)
(
vlc_object_t
*
p_this
,
const
char
*
psz_bind
,
int
i_bind
,
const
char
*
psz_server
,
int
i_server
);
void
(
*
net_Close_inner
)
(
int
fd
);
int
(
*
__net_Read_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
vlc_bool_t
b_retry
);
int
(
*
__net_ReadNonBlock_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
);
int
(
*
__net_Select_inner
)
(
vlc_object_t
*
p_this
,
int
*
pi_fd
,
v_socket_t
*
*
,
int
i_fd
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
);
int
(
*
__net_Write_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
const
uint8_t
*
p_data
,
int
i_data
);
char
*
(
*
__net_Gets_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
);
int
(
*
net_Printf_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
const
char
*
psz_fmt
,
...);
int
(
*
__net_vaPrintf_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
const
char
*
psz_fmt
,
va_list
args
);
int
(
*
__net_Read_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
vlc_bool_t
b_retry
);
int
(
*
__net_ReadNonBlock_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
);
int
(
*
__net_Select_inner
)
(
vlc_object_t
*
p_this
,
const
int
*
pi_fd
,
const
v_socket_t
*
const
*
,
int
i_fd
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
);
int
(
*
__net_Write_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
uint8_t
*
p_data
,
int
i_data
);
char
*
(
*
__net_Gets_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
);
int
(
*
net_Printf_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
char
*
psz_fmt
,
...);
int
(
*
__net_vaPrintf_inner
)
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
char
*
psz_fmt
,
va_list
args
);
int
(
*
vout_ShowTextRelative_inner
)
(
vout_thread_t
*
,
int
,
char
*
,
text_style_t
*
,
int
,
int
,
int
,
mtime_t
);
int
(
*
vout_ShowTextAbsolute_inner
)
(
vout_thread_t
*
,
int
,
char
*
,
text_style_t
*
,
int
,
int
,
int
,
mtime_t
,
mtime_t
);
void
(
*
__vout_OSDMessage_inner
)
(
vlc_object_t
*
,
int
,
char
*
,
...);
...
...
src/network/io.c
View file @
b96f1239
...
...
@@ -136,7 +136,7 @@ void net_Close( int fd )
static
int
net_ReadInner
(
vlc_object_t
*
restrict
p_this
,
unsigned
fdc
,
const
int
*
fdv
,
v_socket_t
*
const
*
restrict
vsv
,
const
v_socket_t
*
const
*
restrict
vsv
,
uint8_t
*
restrict
buf
,
size_t
buflen
,
int
wait_ms
,
vlc_bool_t
waitall
)
{
...
...
@@ -280,10 +280,11 @@ error:
* data
*****************************************************************************/
int
__net_Read
(
vlc_object_t
*
restrict
p_this
,
int
fd
,
v_socket_t
*
restrict
p_vs
,
const
v_socket_t
*
restrict
p_vs
,
uint8_t
*
restrict
p_data
,
int
i_data
,
vlc_bool_t
b_retry
)
{
return
net_ReadInner
(
p_this
,
1
,
&
(
int
){
fd
},
&
(
v_socket_t
*
){
p_vs
},
return
net_ReadInner
(
p_this
,
1
,
&
(
int
){
fd
},
&
(
const
v_socket_t
*
){
p_vs
},
p_data
,
i_data
,
-
1
,
b_retry
);
}
...
...
@@ -294,10 +295,11 @@ int __net_Read( vlc_object_t *restrict p_this, int fd,
* Read from a network socket, non blocking mode (with timeout)
*****************************************************************************/
int
__net_ReadNonBlock
(
vlc_object_t
*
restrict
p_this
,
int
fd
,
v_socket_t
*
restrict
p_vs
,
const
v_socket_t
*
restrict
p_vs
,
uint8_t
*
restrict
p_data
,
int
i_data
,
mtime_t
i_wait
)
{
return
net_ReadInner
(
p_this
,
1
,
&
(
int
){
fd
},
&
(
v_socket_t
*
){
p_vs
},
return
net_ReadInner
(
p_this
,
1
,
&
(
int
){
fd
},
&
(
const
v_socket_t
*
){
p_vs
},
p_data
,
i_data
,
i_wait
/
1000
,
VLC_FALSE
);
}
...
...
@@ -308,8 +310,8 @@ int __net_ReadNonBlock( vlc_object_t *restrict p_this, int fd,
* Read from several sockets (with timeout). Takes data from the first socket
* that has some.
*****************************************************************************/
int
__net_Select
(
vlc_object_t
*
restrict
p_this
,
int
*
restrict
pi_fd
,
v_socket_t
*
*
restrict
pp_vs
,
int
__net_Select
(
vlc_object_t
*
restrict
p_this
,
const
int
*
restrict
pi_fd
,
const
v_socket_t
*
const
*
restrict
pp_vs
,
int
i_fd
,
uint8_t
*
restrict
p_data
,
int
i_data
,
mtime_t
i_wait
)
{
...
...
@@ -328,7 +330,7 @@ int __net_Select( vlc_object_t *restrict p_this, int *restrict pi_fd,
/* Write exact amount requested */
int
__net_Write
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
p_vs
,
int
__net_Write
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
p_vs
,
const
uint8_t
*
p_data
,
int
i_data
)
{
struct
timeval
timeout
;
...
...
@@ -388,7 +390,7 @@ int __net_Write( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
return
i_total
;
}
char
*
__net_Gets
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
p_vs
)
char
*
__net_Gets
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
p_vs
)
{
char
*
psz_line
=
NULL
,
*
ptr
=
NULL
;
size_t
i_line
=
0
,
i_max
=
0
;
...
...
@@ -428,7 +430,7 @@ char *__net_Gets( vlc_object_t *p_this, int fd, v_socket_t *p_vs )
return
psz_line
;
}
int
net_Printf
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
p_vs
,
int
net_Printf
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
p_vs
,
const
char
*
psz_fmt
,
...
)
{
int
i_ret
;
...
...
@@ -440,7 +442,7 @@ int net_Printf( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
return
i_ret
;
}
int
__net_vaPrintf
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
p_vs
,
int
__net_vaPrintf
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
p_vs
,
const
char
*
psz_fmt
,
va_list
args
)
{
char
*
psz
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment