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

Remove no longer used net_Printf() argument

parent e46b0db2
...@@ -151,8 +151,8 @@ VLC_API char * net_Gets( vlc_object_t *p_this, int fd ); ...@@ -151,8 +151,8 @@ VLC_API char * net_Gets( vlc_object_t *p_this, int fd );
#define net_Gets(a,b) net_Gets(VLC_OBJECT(a),b) #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 char *psz_fmt, ... ) VLC_FORMAT( 3, 4 );
#define net_Printf(o,fd,vs,...) net_Printf(VLC_OBJECT(o),fd,vs, __VA_ARGS__) #define net_Printf(o,fd,...) net_Printf(VLC_OBJECT(o),fd, __VA_ARGS__)
VLC_API ssize_t net_vaPrintf( vlc_object_t *p_this, int fd, const v_socket_t *, const char *psz_fmt, va_list args ); VLC_API ssize_t net_vaPrintf( vlc_object_t *p_this, int fd, const v_socket_t *, const char *psz_fmt, va_list args );
#define net_vaPrintf(a,b,c,d,e) net_vaPrintf(VLC_OBJECT(a),b,c,d,e) #define net_vaPrintf(a,b,c,d,e) net_vaPrintf(VLC_OBJECT(a),b,c,d,e)
......
...@@ -530,8 +530,7 @@ static int OpenConnection( access_t *p_access ) ...@@ -530,8 +530,7 @@ static int OpenConnection( access_t *p_access )
if( p_sys->b_proxy ) if( p_sys->b_proxy )
{ {
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd, "GET http://%s:%d%s HTTP/1.0\r\n",
"GET http://%s:%d%s HTTP/1.0\r\n",
p_sys->url.psz_host, p_sys->url.i_port, p_sys->url.psz_host, p_sys->url.i_port,
( (p_sys->url.psz_path == NULL) || ( (p_sys->url.psz_path == NULL) ||
(*p_sys->url.psz_path == '\0') ) ? (*p_sys->url.psz_path == '\0') ) ?
...@@ -550,15 +549,14 @@ static int OpenConnection( access_t *p_access ) ...@@ -550,15 +549,14 @@ static int OpenConnection( access_t *p_access )
b64 = vlc_b64_encode( buf ); b64 = vlc_b64_encode( buf );
free( buf ); free( buf );
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd,
"Proxy-Authorization: Basic %s\r\n", b64 ); "Proxy-Authorization: Basic %s\r\n", b64 );
free( b64 ); free( b64 );
} }
} }
else else
{ {
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd, "GET %s HTTP/1.0\r\n"
"GET %s HTTP/1.0\r\n"
"Host: %s:%d\r\n", "Host: %s:%d\r\n",
( (p_sys->url.psz_path == NULL) || ( (p_sys->url.psz_path == NULL) ||
(*p_sys->url.psz_path == '\0') ) ? (*p_sys->url.psz_path == '\0') ) ?
...@@ -593,7 +591,7 @@ static int Describe( access_t *p_access, char **ppsz_location ) ...@@ -593,7 +591,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
if( OpenConnection( p_access ) ) if( OpenConnection( p_access ) )
return VLC_EGENERIC; return VLC_EGENERIC;
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd,
"Accept: */*\r\n" "Accept: */*\r\n"
"User-Agent: "MMSH_USER_AGENT"\r\n" "User-Agent: "MMSH_USER_AGENT"\r\n"
"Pragma: no-cache,rate=1.000000,stream-time=0,stream-offset=0:0,request-context=%d,max-duration=0\r\n" "Pragma: no-cache,rate=1.000000,stream-time=0,stream-offset=0:0,request-context=%d,max-duration=0\r\n"
...@@ -602,7 +600,7 @@ static int Describe( access_t *p_access, char **ppsz_location ) ...@@ -602,7 +600,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
p_sys->i_request_context++, p_sys->i_request_context++,
GUID_PRINT( p_sys->guid ) ); GUID_PRINT( p_sys->guid ) );
if( net_Printf( p_access, p_sys->fd, NULL, "\r\n" ) < 0 ) if( net_Printf( p_access, p_sys->fd, "\r\n" ) < 0 )
{ {
msg_Err( p_access, "failed to send request" ); msg_Err( p_access, "failed to send request" );
goto error; goto error;
...@@ -816,24 +814,24 @@ static int Start( access_t *p_access, uint64_t i_pos ) ...@@ -816,24 +814,24 @@ static int Start( access_t *p_access, uint64_t i_pos )
if( OpenConnection( p_access ) ) if( OpenConnection( p_access ) )
return VLC_EGENERIC; return VLC_EGENERIC;
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd,
"Accept: */*\r\n" "Accept: */*\r\n"
"User-Agent: "MMSH_USER_AGENT"\r\n" ); "User-Agent: "MMSH_USER_AGENT"\r\n" );
if( p_sys->b_broadcast ) if( p_sys->b_broadcast )
{ {
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd,
"Pragma: no-cache,rate=1.000000,request-context=%d\r\n", "Pragma: no-cache,rate=1.000000,request-context=%d\r\n",
p_sys->i_request_context++ ); p_sys->i_request_context++ );
} }
else else
{ {
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd,
"Pragma: no-cache,rate=1.000000,stream-time=0,stream-offset=%u:%u,request-context=%d,max-duration=0\r\n", "Pragma: no-cache,rate=1.000000,stream-time=0,stream-offset=%u:%u,request-context=%d,max-duration=0\r\n",
(uint32_t)((i_pos >> 32)&0xffffffff), (uint32_t)((i_pos >> 32)&0xffffffff),
(uint32_t)(i_pos&0xffffffff), (uint32_t)(i_pos&0xffffffff),
p_sys->i_request_context++ ); p_sys->i_request_context++ );
} }
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd,
"Pragma: xPlayStrm=1\r\n" "Pragma: xPlayStrm=1\r\n"
"Pragma: xClientGUID={"GUID_FMT"}\r\n" "Pragma: xClientGUID={"GUID_FMT"}\r\n"
"Pragma: stream-switch-count=%d\r\n" "Pragma: stream-switch-count=%d\r\n"
...@@ -850,15 +848,13 @@ static int Start( access_t *p_access, uint64_t i_pos ) ...@@ -850,15 +848,13 @@ static int Start( access_t *p_access, uint64_t i_pos )
{ {
i_select = 0; i_select = 0;
} }
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd, "ffff:%x:%d ", i, i_select );
"ffff:%x:%d ", i, i_select );
} }
} }
net_Printf( p_access, p_sys->fd, NULL, "\r\n" ); net_Printf( p_access, p_sys->fd, "\r\n" );
net_Printf( p_access, p_sys->fd, NULL, net_Printf( p_access, p_sys->fd, "Connection: Close\r\n" );
"Connection: Close\r\n" );
if( net_Printf( p_access, p_sys->fd, NULL, "\r\n" ) < 0 ) if( net_Printf( p_access, p_sys->fd, "\r\n" ) < 0 )
{ {
msg_Err( p_access, "failed to send request" ); msg_Err( p_access, "failed to send request" );
return VLC_EGENERIC; return VLC_EGENERIC;
......
...@@ -133,7 +133,7 @@ static int RtspWrite( void *p_userdata, uint8_t *p_buffer, int i_buffer ) ...@@ -133,7 +133,7 @@ static int RtspWrite( void *p_userdata, uint8_t *p_buffer, int i_buffer )
//fprintf(stderr, "Write: %s", p_buffer); //fprintf(stderr, "Write: %s", p_buffer);
net_Printf( p_access, p_sys->fd, 0, "%s", p_buffer ); net_Printf( p_access, p_sys->fd, "%s", p_buffer );
return 0; return 0;
} }
......
...@@ -808,7 +808,7 @@ static void *Run(void *data) ...@@ -808,7 +808,7 @@ static void *Run(void *data)
} }
/* we transmit the data */ /* we transmit the data */
int i_net_ret = net_Printf(p_intf, i_post_socket, NULL, int i_net_ret = net_Printf(p_intf, i_post_socket,
"POST %s HTTP/1.1\n" "POST %s HTTP/1.1\n"
"Accept-Encoding: identity\n" "Accept-Encoding: identity\n"
"Content-length: %zu\n" "Content-length: %zu\n"
......
...@@ -734,7 +734,7 @@ static int WriteAuxHeaders( vlc_object_t *p_this, ...@@ -734,7 +734,7 @@ static int WriteAuxHeaders( vlc_object_t *p_this,
psz_key = ppsz_keys[i]; psz_key = ppsz_keys[i];
psz_value = vlc_dictionary_value_for_key( p_req_headers, psz_key ); psz_value = vlc_dictionary_value_for_key( p_req_headers, psz_key );
i_rc = net_Printf( p_this, p_sys->i_control_fd, NULL, i_rc = net_Printf( p_this, p_sys->i_control_fd,
"%s: %s\r\n", psz_key, psz_value ); "%s: %s\r\n", psz_key, psz_value );
if ( i_rc < 0 ) if ( i_rc < 0 )
{ {
...@@ -762,7 +762,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method, ...@@ -762,7 +762,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method,
int i_err = VLC_SUCCESS; int i_err = VLC_SUCCESS;
int i_rc; int i_rc;
i_rc = net_Printf( p_this, p_sys->i_control_fd, NULL, i_rc = net_Printf( p_this, p_sys->i_control_fd,
"%s %s RTSP/1.0\r\n" "%s %s RTSP/1.0\r\n"
"User-Agent: " RAOP_USER_AGENT "\r\n" "User-Agent: " RAOP_USER_AGENT "\r\n"
"Client-Instance: %s\r\n" "Client-Instance: %s\r\n"
...@@ -778,7 +778,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method, ...@@ -778,7 +778,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method,
if ( psz_content_type ) if ( psz_content_type )
{ {
i_rc = net_Printf( p_this, p_sys->i_control_fd, NULL, i_rc = net_Printf( p_this, p_sys->i_control_fd,
"Content-Type: %s\r\n", psz_content_type ); "Content-Type: %s\r\n", psz_content_type );
if ( i_rc < 0 ) if ( i_rc < 0 )
{ {
...@@ -791,7 +791,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method, ...@@ -791,7 +791,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method,
{ {
i_body_length = strlen( psz_body ); i_body_length = strlen( psz_body );
i_rc = net_Printf( p_this, p_sys->i_control_fd, NULL, i_rc = net_Printf( p_this, p_sys->i_control_fd,
"Content-Length: %u\r\n", "Content-Length: %u\r\n",
(unsigned int)i_body_length ); (unsigned int)i_body_length );
if ( i_rc < 0 ) if ( i_rc < 0 )
......
...@@ -505,13 +505,12 @@ error: ...@@ -505,13 +505,12 @@ error:
} }
#undef net_Printf #undef net_Printf
ssize_t net_Printf( vlc_object_t *p_this, int fd, const v_socket_t *p_vs, ssize_t net_Printf( vlc_object_t *p_this, int fd, const char *psz_fmt, ... )
const char *psz_fmt, ... )
{ {
int i_ret; int i_ret;
va_list args; va_list args;
va_start( args, psz_fmt ); va_start( args, psz_fmt );
i_ret = net_vaPrintf( p_this, fd, p_vs, psz_fmt, args ); i_ret = net_vaPrintf( p_this, fd, NULL, psz_fmt, args );
va_end( args ); va_end( args );
return i_ret; return i_ret;
......
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