vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sat May 9 19:06:15 2015 +0300| [217fc59faa19c2985fc4440ccfd4625d200a4bab] | committer: Rémi Denis-Courmont
Remove no longer used net_Printf() argument > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=217fc59faa19c2985fc4440ccfd4625d200a4bab --- include/vlc_network.h | 4 ++-- modules/access/mms/mmsh.c | 30 +++++++++++++----------------- modules/access/rtsp/access.c | 2 +- modules/misc/audioscrobbler.c | 2 +- modules/stream_out/raop.c | 8 ++++---- src/network/io.c | 5 ++--- 6 files changed, 23 insertions(+), 28 deletions(-) diff --git a/include/vlc_network.h b/include/vlc_network.h index 7a00061..80939ea 100644 --- a/include/vlc_network.h +++ b/include/vlc_network.h @@ -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) -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 ); -#define net_Printf(o,fd,vs,...) net_Printf(VLC_OBJECT(o),fd,vs, __VA_ARGS__) +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,...) 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 ); #define net_vaPrintf(a,b,c,d,e) net_vaPrintf(VLC_OBJECT(a),b,c,d,e) diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c index 27eeb0b..dcc8c4e 100644 --- a/modules/access/mms/mmsh.c +++ b/modules/access/mms/mmsh.c @@ -530,8 +530,7 @@ static int OpenConnection( access_t *p_access ) if( p_sys->b_proxy ) { - net_Printf( p_access, p_sys->fd, NULL, - "GET http://%s:%d%s HTTP/1.0\r\n", + net_Printf( p_access, p_sys->fd, "GET http://%s:%d%s HTTP/1.0\r\n", p_sys->url.psz_host, p_sys->url.i_port, ( (p_sys->url.psz_path == NULL) || (*p_sys->url.psz_path == '\0') ) ? @@ -550,15 +549,14 @@ static int OpenConnection( access_t *p_access ) b64 = vlc_b64_encode( 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 ); free( b64 ); } } else { - net_Printf( p_access, p_sys->fd, NULL, - "GET %s HTTP/1.0\r\n" + net_Printf( p_access, p_sys->fd, "GET %s HTTP/1.0\r\n" "Host: %s:%d\r\n", ( (p_sys->url.psz_path == NULL) || (*p_sys->url.psz_path == '\0') ) ? @@ -593,7 +591,7 @@ static int Describe( access_t *p_access, char **ppsz_location ) if( OpenConnection( p_access ) ) return VLC_EGENERIC; - net_Printf( p_access, p_sys->fd, NULL, + net_Printf( p_access, p_sys->fd, "Accept: */*\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" @@ -602,7 +600,7 @@ static int Describe( access_t *p_access, char **ppsz_location ) p_sys->i_request_context++, 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" ); goto error; @@ -816,24 +814,24 @@ static int Start( access_t *p_access, uint64_t i_pos ) if( OpenConnection( p_access ) ) return VLC_EGENERIC; - net_Printf( p_access, p_sys->fd, NULL, + net_Printf( p_access, p_sys->fd, "Accept: */*\r\n" "User-Agent: "MMSH_USER_AGENT"\r\n" ); 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", p_sys->i_request_context++ ); } 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", (uint32_t)((i_pos >> 32)&0xffffffff), (uint32_t)(i_pos&0xffffffff), 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: xClientGUID={"GUID_FMT"}\r\n" "Pragma: stream-switch-count=%d\r\n" @@ -850,15 +848,13 @@ static int Start( access_t *p_access, uint64_t i_pos ) { i_select = 0; } - net_Printf( p_access, p_sys->fd, NULL, - "ffff:%x:%d ", i, i_select ); + net_Printf( p_access, p_sys->fd, "ffff:%x:%d ", i, i_select ); } } - net_Printf( p_access, p_sys->fd, NULL, "\r\n" ); - net_Printf( p_access, p_sys->fd, NULL, - "Connection: Close\r\n" ); + net_Printf( p_access, p_sys->fd, "\r\n" ); + net_Printf( p_access, p_sys->fd, "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" ); return VLC_EGENERIC; diff --git a/modules/access/rtsp/access.c b/modules/access/rtsp/access.c index cb2f2e4..2e598aa 100644 --- a/modules/access/rtsp/access.c +++ b/modules/access/rtsp/access.c @@ -133,7 +133,7 @@ static int RtspWrite( void *p_userdata, uint8_t *p_buffer, int i_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; } diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c index 187ebe0..4ec46d4 100644 --- a/modules/misc/audioscrobbler.c +++ b/modules/misc/audioscrobbler.c @@ -808,7 +808,7 @@ static void *Run(void *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" "Accept-Encoding: identity\n" "Content-length: %zu\n" diff --git a/modules/stream_out/raop.c b/modules/stream_out/raop.c index 3ed8f1b..415ad5a 100644 --- a/modules/stream_out/raop.c +++ b/modules/stream_out/raop.c @@ -734,7 +734,7 @@ static int WriteAuxHeaders( vlc_object_t *p_this, psz_key = ppsz_keys[i]; 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 ); if ( i_rc < 0 ) { @@ -762,7 +762,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method, int i_err = VLC_SUCCESS; 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" "User-Agent: " RAOP_USER_AGENT "\r\n" "Client-Instance: %s\r\n" @@ -778,7 +778,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method, 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 ); if ( i_rc < 0 ) { @@ -791,7 +791,7 @@ static int SendRequest( vlc_object_t *p_this, const char *psz_method, { 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", (unsigned int)i_body_length ); if ( i_rc < 0 ) diff --git a/src/network/io.c b/src/network/io.c index 5f8244b..438e194 100644 --- a/src/network/io.c +++ b/src/network/io.c @@ -505,13 +505,12 @@ error: } #undef net_Printf -ssize_t net_Printf( vlc_object_t *p_this, int fd, const v_socket_t *p_vs, - const char *psz_fmt, ... ) +ssize_t net_Printf( vlc_object_t *p_this, int fd, const char *psz_fmt, ... ) { int i_ret; va_list args; 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 ); return i_ret; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
