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

Kartik Ohri kartikohri13 at gmail.com
Tue Mar 10 17:32:05 CET 2020


On Tue, Mar 10, 2020 at 9:55 PM Rémi Denis-Courmont <remi at remlab.net> wrote:

> 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.
>
I do not have much experience on working on writing something ground up or
without guidance in a real world project. Can you point out the issue ? I
will fix that in the next patch.

>
> > +    {
> > +        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/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200310/011b3345/attachment.html>


More information about the vlc-devel mailing list