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
e46b0db2
Commit
e46b0db2
authored
May 09, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove no longer used net_Gets() argument
parent
48476f03
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
22 deletions
+21
-22
include/vlc_network.h
include/vlc_network.h
+2
-2
modules/access/ftp.c
modules/access/ftp.c
+3
-3
modules/access/http.c
modules/access/http.c
+6
-6
modules/access/mms/mmsh.c
modules/access/mms/mmsh.c
+4
-4
modules/access/rtsp/access.c
modules/access/rtsp/access.c
+1
-1
modules/demux/adaptative/http/Sockets.cpp
modules/demux/adaptative/http/Sockets.cpp
+1
-1
modules/stream_out/raop.c
modules/stream_out/raop.c
+2
-3
src/network/io.c
src/network/io.c
+2
-2
No files found.
include/vlc_network.h
View file @
e46b0db2
...
@@ -147,8 +147,8 @@ VLC_API ssize_t net_Read( vlc_object_t *p_this, int fd, const v_socket_t *, void
...
@@ -147,8 +147,8 @@ VLC_API ssize_t net_Read( vlc_object_t *p_this, int fd, const v_socket_t *, void
#define net_Read(a,b,c,d,e,f) net_Read(VLC_OBJECT(a),b,c,d,e,f)
#define net_Read(a,b,c,d,e,f) net_Read(VLC_OBJECT(a),b,c,d,e,f)
VLC_API
ssize_t
net_Write
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
void
*
p_data
,
size_t
i_data
);
VLC_API
ssize_t
net_Write
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
void
*
p_data
,
size_t
i_data
);
#define net_Write(a,b,c,d,e) net_Write(VLC_OBJECT(a),b,c,d,e)
#define net_Write(a,b,c,d,e) net_Write(VLC_OBJECT(a),b,c,d,e)
VLC_API
char
*
net_Gets
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
);
VLC_API
char
*
net_Gets
(
vlc_object_t
*
p_this
,
int
fd
);
#define net_Gets(a,b
,c) net_Gets(VLC_OBJECT(a),b,c
)
#define net_Gets(a,b
) net_Gets(VLC_OBJECT(a),b
)
VLC_API
ssize_t
net_Printf
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
char
*
psz_fmt
,
...
)
VLC_FORMAT
(
4
,
5
);
VLC_API
ssize_t
net_Printf
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
char
*
psz_fmt
,
...
)
VLC_FORMAT
(
4
,
5
);
...
...
modules/access/ftp.c
View file @
e46b0db2
...
@@ -208,7 +208,7 @@ static int ftp_RecvAnswer( vlc_object_t *obj, access_sys_t *sys,
...
@@ -208,7 +208,7 @@ static int ftp_RecvAnswer( vlc_object_t *obj, access_sys_t *sys,
if
(
sys
->
cmd
.
p_tls
!=
NULL
)
if
(
sys
->
cmd
.
p_tls
!=
NULL
)
resp
=
vlc_tls_GetLine
(
sys
->
cmd
.
p_tls
);
resp
=
vlc_tls_GetLine
(
sys
->
cmd
.
p_tls
);
else
else
resp
=
net_Gets
(
obj
,
sys
->
cmd
.
fd
,
NULL
);
resp
=
net_Gets
(
obj
,
sys
->
cmd
.
fd
);
if
(
resp
==
NULL
)
if
(
resp
==
NULL
)
{
{
msg_Err
(
obj
,
"response failure"
);
msg_Err
(
obj
,
"response failure"
);
...
@@ -235,7 +235,7 @@ static int ftp_RecvAnswer( vlc_object_t *obj, access_sys_t *sys,
...
@@ -235,7 +235,7 @@ static int ftp_RecvAnswer( vlc_object_t *obj, access_sys_t *sys,
if
(
sys
->
cmd
.
p_tls
!=
NULL
)
if
(
sys
->
cmd
.
p_tls
!=
NULL
)
line
=
vlc_tls_GetLine
(
sys
->
cmd
.
p_tls
);
line
=
vlc_tls_GetLine
(
sys
->
cmd
.
p_tls
);
else
else
line
=
net_Gets
(
obj
,
sys
->
cmd
.
fd
,
NULL
);
line
=
net_Gets
(
obj
,
sys
->
cmd
.
fd
);
if
(
line
==
NULL
)
if
(
line
==
NULL
)
{
{
msg_Err
(
obj
,
"response failure"
);
msg_Err
(
obj
,
"response failure"
);
...
@@ -852,7 +852,7 @@ static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
...
@@ -852,7 +852,7 @@ static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
if
(
p_sys
->
data
.
p_tls
!=
NULL
)
if
(
p_sys
->
data
.
p_tls
!=
NULL
)
psz_line
=
vlc_tls_GetLine
(
p_sys
->
data
.
p_tls
);
psz_line
=
vlc_tls_GetLine
(
p_sys
->
data
.
p_tls
);
else
else
psz_line
=
net_Gets
(
p_access
,
p_sys
->
data
.
fd
,
NULL
);
psz_line
=
net_Gets
(
p_access
,
p_sys
->
data
.
fd
);
char
*
psz_uri
;
char
*
psz_uri
;
if
(
asprintf
(
&
psz_uri
,
"%s://%s:%d%s%s/%s"
,
if
(
asprintf
(
&
psz_uri
,
"%s://%s:%d%s%s/%s"
,
...
...
modules/access/http.c
View file @
e46b0db2
...
@@ -647,7 +647,7 @@ static int ReadData( access_t *p_access, int *pi_read,
...
@@ -647,7 +647,7 @@ static int ReadData( access_t *p_access, int *pi_read,
if
(
p_sys
->
p_tls
!=
NULL
)
if
(
p_sys
->
p_tls
!=
NULL
)
psz
=
vlc_tls_GetLine
(
p_sys
->
p_tls
);
psz
=
vlc_tls_GetLine
(
p_sys
->
p_tls
);
else
else
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
);
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
/* read the chunk header */
/* read the chunk header */
if
(
psz
==
NULL
)
if
(
psz
==
NULL
)
{
{
...
@@ -684,7 +684,7 @@ static int ReadData( access_t *p_access, int *pi_read,
...
@@ -684,7 +684,7 @@ static int ReadData( access_t *p_access, int *pi_read,
if
(
p_sys
->
p_tls
!=
NULL
)
if
(
p_sys
->
p_tls
!=
NULL
)
free
(
vlc_tls_GetLine
(
p_sys
->
p_tls
)
);
free
(
vlc_tls_GetLine
(
p_sys
->
p_tls
)
);
else
else
free
(
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
)
);
free
(
net_Gets
(
p_access
,
p_sys
->
fd
)
);
}
}
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -1083,7 +1083,7 @@ static int Connect( access_t *p_access, uint64_t i_tell )
...
@@ -1083,7 +1083,7 @@ static int Connect( access_t *p_access, uint64_t i_tell )
p_sys
->
i_version
,
p_sys
->
i_version
,
p_sys
->
url
.
psz_host
,
p_sys
->
url
.
i_port
);
p_sys
->
url
.
psz_host
,
p_sys
->
url
.
i_port
);
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
);
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
if
(
psz
==
NULL
)
if
(
psz
==
NULL
)
{
{
msg_Err
(
p_access
,
"cannot establish HTTP/TLS tunnel"
);
msg_Err
(
p_access
,
"cannot establish HTTP/TLS tunnel"
);
...
@@ -1103,7 +1103,7 @@ static int Connect( access_t *p_access, uint64_t i_tell )
...
@@ -1103,7 +1103,7 @@ static int Connect( access_t *p_access, uint64_t i_tell )
do
do
{
{
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
);
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
if
(
psz
==
NULL
)
if
(
psz
==
NULL
)
{
{
msg_Err
(
p_access
,
"HTTP proxy connection failed"
);
msg_Err
(
p_access
,
"HTTP proxy connection failed"
);
...
@@ -1213,7 +1213,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
...
@@ -1213,7 +1213,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
if
(
p_sys
->
p_tls
!=
NULL
)
if
(
p_sys
->
p_tls
!=
NULL
)
psz
=
vlc_tls_GetLine
(
p_sys
->
p_tls
);
psz
=
vlc_tls_GetLine
(
p_sys
->
p_tls
);
else
else
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
);
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
if
(
psz
==
NULL
)
if
(
psz
==
NULL
)
{
{
msg_Err
(
p_access
,
"failed to read answer"
);
msg_Err
(
p_access
,
"failed to read answer"
);
...
@@ -1267,7 +1267,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
...
@@ -1267,7 +1267,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
if
(
p_sys
->
p_tls
!=
NULL
)
if
(
p_sys
->
p_tls
!=
NULL
)
psz
=
vlc_tls_GetLine
(
p_sys
->
p_tls
);
psz
=
vlc_tls_GetLine
(
p_sys
->
p_tls
);
else
else
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
);
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
if
(
psz
==
NULL
)
if
(
psz
==
NULL
)
{
{
msg_Err
(
p_access
,
"failed to read answer"
);
msg_Err
(
p_access
,
"failed to read answer"
);
...
...
modules/access/mms/mmsh.c
View file @
e46b0db2
...
@@ -609,7 +609,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
...
@@ -609,7 +609,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
}
}
/* Receive the http header */
/* Receive the http header */
if
(
(
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
)
)
==
NULL
)
if
(
(
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
)
)
==
NULL
)
{
{
msg_Err
(
p_access
,
"failed to read answer"
);
msg_Err
(
p_access
,
"failed to read answer"
);
goto
error
;
goto
error
;
...
@@ -633,7 +633,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
...
@@ -633,7 +633,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
free
(
psz
);
free
(
psz
);
for
(
;;
)
for
(
;;
)
{
{
char
*
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
);
char
*
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
char
*
p
;
char
*
p
;
if
(
psz
==
NULL
)
if
(
psz
==
NULL
)
...
@@ -864,7 +864,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
...
@@ -864,7 +864,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
);
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
if
(
psz
==
NULL
)
if
(
psz
==
NULL
)
{
{
msg_Err
(
p_access
,
"cannot read data 0"
);
msg_Err
(
p_access
,
"cannot read data 0"
);
...
@@ -883,7 +883,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
...
@@ -883,7 +883,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
/* FIXME check HTTP code */
/* FIXME check HTTP code */
for
(
;;
)
for
(
;;
)
{
{
char
*
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
NULL
);
char
*
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
if
(
psz
==
NULL
)
if
(
psz
==
NULL
)
{
{
msg_Err
(
p_access
,
"cannot read data 1"
);
msg_Err
(
p_access
,
"cannot read data 1"
);
...
...
modules/access/rtsp/access.c
View file @
e46b0db2
...
@@ -114,7 +114,7 @@ static int RtspReadLine( void *p_userdata, uint8_t *p_buffer, int i_buffer )
...
@@ -114,7 +114,7 @@ static int RtspReadLine( void *p_userdata, uint8_t *p_buffer, int i_buffer )
access_t
*
p_access
=
(
access_t
*
)
p_userdata
;
access_t
*
p_access
=
(
access_t
*
)
p_userdata
;
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
char
*
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
,
0
);
char
*
psz
=
net_Gets
(
p_access
,
p_sys
->
fd
);
//fprintf(stderr, "ReadLine: %s\n", psz);
//fprintf(stderr, "ReadLine: %s\n", psz);
...
...
modules/demux/adaptative/http/Sockets.cpp
View file @
e46b0db2
...
@@ -70,7 +70,7 @@ ssize_t Socket::read(vlc_object_t *stream, void *p_buffer, size_t len)
...
@@ -70,7 +70,7 @@ ssize_t Socket::read(vlc_object_t *stream, void *p_buffer, size_t len)
std
::
string
Socket
::
readline
(
vlc_object_t
*
stream
)
std
::
string
Socket
::
readline
(
vlc_object_t
*
stream
)
{
{
char
*
line
=
::
net_Gets
(
stream
,
netfd
,
NULL
);
char
*
line
=
::
net_Gets
(
stream
,
netfd
);
if
(
line
==
NULL
)
if
(
line
==
NULL
)
return
""
;
return
""
;
std
::
string
ret
(
line
);
std
::
string
ret
(
line
);
...
...
modules/stream_out/raop.c
View file @
e46b0db2
...
@@ -632,8 +632,7 @@ static int ReadStatusLine( vlc_object_t *p_this )
...
@@ -632,8 +632,7 @@ static int ReadStatusLine( vlc_object_t *p_this )
char
*
psz_next
;
char
*
psz_next
;
int
i_result
=
VLC_EGENERIC
;
int
i_result
=
VLC_EGENERIC
;
p_sys
->
psz_last_status_line
=
net_Gets
(
p_this
,
p_sys
->
i_control_fd
,
p_sys
->
psz_last_status_line
=
net_Gets
(
p_this
,
p_sys
->
i_control_fd
);
NULL
);
if
(
!
p_sys
->
psz_last_status_line
)
if
(
!
p_sys
->
psz_last_status_line
)
goto
error
;
goto
error
;
...
@@ -681,7 +680,7 @@ static int ReadHeader( vlc_object_t *p_this,
...
@@ -681,7 +680,7 @@ static int ReadHeader( vlc_object_t *p_this,
char
*
psz_value
;
char
*
psz_value
;
int
i_err
=
VLC_SUCCESS
;
int
i_err
=
VLC_SUCCESS
;
psz_line
=
net_Gets
(
p_this
,
p_sys
->
i_control_fd
,
NULL
);
psz_line
=
net_Gets
(
p_this
,
p_sys
->
i_control_fd
);
if
(
!
psz_line
)
if
(
!
psz_line
)
{
{
i_err
=
VLC_EGENERIC
;
i_err
=
VLC_EGENERIC
;
...
...
src/network/io.c
View file @
e46b0db2
...
@@ -466,7 +466,7 @@ error:
...
@@ -466,7 +466,7 @@ error:
*
*
* @return nul-terminated heap-allocated string, or NULL on I/O error.
* @return nul-terminated heap-allocated string, or NULL on I/O error.
*/
*/
char
*
net_Gets
(
vlc_object_t
*
obj
,
int
fd
,
const
v_socket_t
*
vs
)
char
*
net_Gets
(
vlc_object_t
*
obj
,
int
fd
)
{
{
char
*
buf
=
NULL
;
char
*
buf
=
NULL
;
size_t
bufsize
=
0
,
buflen
=
0
;
size_t
bufsize
=
0
,
buflen
=
0
;
...
@@ -485,7 +485,7 @@ char *net_Gets(vlc_object_t *obj, int fd, const v_socket_t *vs)
...
@@ -485,7 +485,7 @@ char *net_Gets(vlc_object_t *obj, int fd, const v_socket_t *vs)
bufsize
+=
1024
;
bufsize
+=
1024
;
}
}
ssize_t
val
=
net_Read
(
obj
,
fd
,
vs
,
buf
+
buflen
,
1
,
false
);
ssize_t
val
=
net_Read
(
obj
,
fd
,
NULL
,
buf
+
buflen
,
1
,
false
);
if
(
val
<
1
)
if
(
val
<
1
)
goto
error
;
goto
error
;
...
...
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