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

Remove no longer used net_Gets() argument

parent 48476f03
......@@ -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)
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)
VLC_API char * net_Gets( vlc_object_t *p_this, int fd, const v_socket_t * );
#define net_Gets(a,b,c) net_Gets(VLC_OBJECT(a),b,c)
VLC_API char * net_Gets( vlc_object_t *p_this, int fd );
#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 );
......
......@@ -208,7 +208,7 @@ static int ftp_RecvAnswer( vlc_object_t *obj, access_sys_t *sys,
if( sys->cmd.p_tls != NULL )
resp = vlc_tls_GetLine( sys->cmd.p_tls );
else
resp = net_Gets( obj, sys->cmd.fd, NULL );
resp = net_Gets( obj, sys->cmd.fd );
if( resp == NULL )
{
msg_Err( obj, "response failure" );
......@@ -235,7 +235,7 @@ static int ftp_RecvAnswer( vlc_object_t *obj, access_sys_t *sys,
if( sys->cmd.p_tls != NULL )
line = vlc_tls_GetLine( sys->cmd.p_tls );
else
line = net_Gets( obj, sys->cmd.fd, NULL );
line = net_Gets( obj, sys->cmd.fd );
if( line == NULL )
{
msg_Err( obj, "response failure" );
......@@ -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 )
psz_line = vlc_tls_GetLine( p_sys->data.p_tls );
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;
if( asprintf( &psz_uri, "%s://%s:%d%s%s/%s",
......
......@@ -647,7 +647,7 @@ static int ReadData( access_t *p_access, int *pi_read,
if( p_sys->p_tls != NULL )
psz = vlc_tls_GetLine( p_sys->p_tls );
else
psz = net_Gets( p_access, p_sys->fd, NULL );
psz = net_Gets( p_access, p_sys->fd );
/* read the chunk header */
if( psz == NULL )
{
......@@ -684,7 +684,7 @@ static int ReadData( access_t *p_access, int *pi_read,
if( p_sys->p_tls != NULL )
free( vlc_tls_GetLine( p_sys->p_tls ) );
else
free( net_Gets( p_access, p_sys->fd, NULL ) );
free( net_Gets( p_access, p_sys->fd ) );
}
}
return VLC_SUCCESS;
......@@ -1083,7 +1083,7 @@ static int Connect( access_t *p_access, uint64_t i_tell )
p_sys->i_version,
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 )
{
msg_Err( p_access, "cannot establish HTTP/TLS tunnel" );
......@@ -1103,7 +1103,7 @@ static int Connect( access_t *p_access, uint64_t i_tell )
do
{
psz = net_Gets( p_access, p_sys->fd, NULL );
psz = net_Gets( p_access, p_sys->fd );
if( psz == NULL )
{
msg_Err( p_access, "HTTP proxy connection failed" );
......@@ -1213,7 +1213,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
if( p_sys->p_tls != NULL )
psz = vlc_tls_GetLine( p_sys->p_tls );
else
psz = net_Gets( p_access, p_sys->fd, NULL );
psz = net_Gets( p_access, p_sys->fd );
if( psz == NULL )
{
msg_Err( p_access, "failed to read answer" );
......@@ -1267,7 +1267,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
if( p_sys->p_tls != NULL )
psz = vlc_tls_GetLine( p_sys->p_tls );
else
psz = net_Gets( p_access, p_sys->fd, NULL );
psz = net_Gets( p_access, p_sys->fd );
if( psz == NULL )
{
msg_Err( p_access, "failed to read answer" );
......
......@@ -609,7 +609,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
}
/* 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" );
goto error;
......@@ -633,7 +633,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
free( psz );
for( ;; )
{
char *psz = net_Gets( p_access, p_sys->fd, NULL );
char *psz = net_Gets( p_access, p_sys->fd );
char *p;
if( psz == NULL )
......@@ -864,7 +864,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
return VLC_EGENERIC;
}
psz = net_Gets( p_access, p_sys->fd, NULL );
psz = net_Gets( p_access, p_sys->fd );
if( psz == NULL )
{
msg_Err( p_access, "cannot read data 0" );
......@@ -883,7 +883,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
/* FIXME check HTTP code */
for( ;; )
{
char *psz = net_Gets( p_access, p_sys->fd, NULL );
char *psz = net_Gets( p_access, p_sys->fd );
if( psz == NULL )
{
msg_Err( p_access, "cannot read data 1" );
......
......@@ -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_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);
......
......@@ -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)
{
char *line = ::net_Gets(stream, netfd, NULL);
char *line = ::net_Gets(stream, netfd);
if(line == NULL)
return "";
std::string ret(line);
......
......@@ -632,8 +632,7 @@ static int ReadStatusLine( vlc_object_t *p_this )
char *psz_next;
int i_result = VLC_EGENERIC;
p_sys->psz_last_status_line = net_Gets( p_this, p_sys->i_control_fd,
NULL );
p_sys->psz_last_status_line = net_Gets( p_this, p_sys->i_control_fd );
if ( !p_sys->psz_last_status_line )
goto error;
......@@ -681,7 +680,7 @@ static int ReadHeader( vlc_object_t *p_this,
char *psz_value;
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 )
{
i_err = VLC_EGENERIC;
......
......@@ -466,7 +466,7 @@ 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;
size_t bufsize = 0, buflen = 0;
......@@ -485,7 +485,7 @@ char *net_Gets(vlc_object_t *obj, int fd, const v_socket_t *vs)
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)
goto error;
......
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