[vlc-devel] [vlc-commits] satip: privatize net_Printf()

Steve Lhomme robux4 at ycbcr.xyz
Mon Nov 12 08:41:57 CET 2018


This broke the win32/win64/macOS builds:
https://jenkins.videolan.org/job/vlc-continuous/job/vlc-cont-win32-x86/5789/console
https://jenkins.videolan.org/job/vlc-continuous/job/vlc-cont-win64-x86-64/5610/console
https://jenkins.videolan.org/job/vlc-continuous/job/vlc-cont-macOS/5111/console

Please revert.

On 11/11/2018 16:33, Rémi Denis-Courmont wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 10 15:17:38 2018 +0200| [184fbc5c54835729361293ef21948de12f818934] | committer: Rémi Denis-Courmont
>
> satip: privatize net_Printf()
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=184fbc5c54835729361293ef21948de12f818934
> ---
>
>   include/vlc_network.h  |  2 --
>   modules/access/satip.c | 17 +++++++++++++++++
>   src/network/io.c       | 12 ------------
>   3 files changed, 17 insertions(+), 14 deletions(-)
>
> diff --git a/include/vlc_network.h b/include/vlc_network.h
> index 9aa2f30909..9a3e9675da 100644
> --- a/include/vlc_network.h
> +++ b/include/vlc_network.h
> @@ -199,8 +199,6 @@ VLC_API ssize_t net_Read( vlc_object_t *p_this, int fd, void *p_data, size_t i_d
>   VLC_API ssize_t net_Write( vlc_object_t *p_this, int fd, const void *p_data, size_t i_data );
>   #define net_Write(a,b,c,d) net_Write(VLC_OBJECT(a),b,c,d)
>   
> -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 char *psz_fmt, va_list args );
>   #define net_vaPrintf(a,b,c,d) net_vaPrintf(VLC_OBJECT(a),b,c,d)
>   
> diff --git a/modules/access/satip.c b/modules/access/satip.c
> index 8ecea610b4..ae71e5fb86 100644
> --- a/modules/access/satip.c
> +++ b/modules/access/satip.c
> @@ -118,6 +118,23 @@ typedef struct
>       bool woken;
>   } access_sys_t;
>   
> +VLC_FORMAT(3, 4)
> +static void net_Printf(stream_t *access, int fd, const char *fmt, ...)
> +{
> +    va_list ap;
> +    char *str;
> +    int val;
> +
> +    va_start(ap, fmt);
> +    val = vasprintf(&str, fmt, ap);
> +    va_end(ap);
> +
> +    if (val >= 0) {
> +        net_Write(access, fd, str, val);
> +        free(str);
> +    }
> +}
> +
>   static void parse_session(char *request_line, char *session, unsigned max, int *timeout) {
>       char *state;
>       char *tok;
> diff --git a/src/network/io.c b/src/network/io.c
> index 7cff7569e1..7fea132724 100644
> --- a/src/network/io.c
> +++ b/src/network/io.c
> @@ -445,18 +445,6 @@ ssize_t (net_Write)(vlc_object_t *obj, int fd, const void *buf, size_t len)
>       return written;
>   }
>   
> -#undef net_Printf
> -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, psz_fmt, args );
> -    va_end( args );
> -
> -    return i_ret;
> -}
> -
>   #undef net_vaPrintf
>   ssize_t net_vaPrintf( vlc_object_t *p_this, int fd,
>                         const char *psz_fmt, va_list args )
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits



More information about the vlc-devel mailing list