[vlc-devel] [PATCH] Add module to submit listens to ListenBrainz.

Rémi Denis-Courmont remi at remlab.net
Tue Mar 10 17:25:28 CET 2020


Le sunnuntaina 8. maaliskuuta 2020, 19.14.41 EET Kartik Ohri a écrit :
> +    i_ret = vlc_tls_Read (sock, p_buffer, sizeof (p_buffer) - 1, false);
> +    msg_Dbg (p_this, "Response: %s", (char *) p_buffer);
> +    vlc_tls_Close (sock);
> +    if ( i_ret <= 0 )
> +    {
> +        msg_Warn (p_this, "No response");
> +        return 1;
> +    }
> +    p_buffer[i_ret] = '\0';
> +    if ( strstr ((char *) p_buffer, "OK") )

This is very sloppy coding.

> +    {
> +        vlc_vector_clear (&p_sys->p_queue);
> +        msg_Dbg (p_this, "Submission successful!");
> +    }
> +    else
> +    {
> +        msg_Warn (p_this, "Error: %s", (char *) p_buffer);
> +        return 1;
> +    }
> +
> +    return 0;
> +}

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list