[vlc-devel] [PATCH 4/4] sout: add airplay support

Francois Cartegnie fcvlcdev at free.fr
Tue Oct 9 09:40:00 CEST 2018


Le 09/10/2018 à 00:47, Alexander Lyon via vlc-devel a écrit :

> +static int ParseWWWAuthenticate( char *psz_www_authenticate, char **ppsz_realm_value, char **ppsz_nonce_value )
> +{
> +    if ( strncmp( psz_www_authenticate, "Digest ", 7 ) != 0 ) return VLC_EGENERIC;
> +
> +    psz_www_authenticate += 7;
> +    char *psz_nonce;
> +    char *psz_realm = strtok_r( psz_www_authenticate, "; ", &psz_nonce );
> +
> +    *ppsz_nonce_value = calloc( sizeof( char ), strlen( psz_nonce ) );
> +    *ppsz_realm_value = calloc( sizeof( char ), strlen( psz_realm ) );

+ 1

> +    sscanf( psz_nonce, "%*[^\"]\"%[^\"]\"", *ppsz_nonce_value );
> +    sscanf( psz_realm, "%*[^\"]\"%[^\"]\"", *ppsz_realm_value );

-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list