Re: [PATCH 02/10] ch_monitor: Update virCHMonitorGet to handle accept a response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2021-07-12 at 14:05 +0200, Michal Prívozník wrote:
> On 6/30/21 1:05 AM, William Douglas wrote:
> 
> > +    memcpy(data->content, contents, content_size);
> > +    data->content[content_size] = 0;
> > +    data->size = content_size;
> > +
> > +    return content_size;
> 
> .. are we sure that the incoming data is split into small enough
> hunks
> that this function is called just once? I mean, the other
> WRITEFUNCTION
> callbacks we have in our code are aware of this and pick up where the
> previous run dropped.

It should always be within 16K but somebody could have a differently
configured curl regardless. Will fix.

> > +            *response = virJSONValueFromString(data.content);
> 
> data.content is not eaten by virJSONValueFromString(). You need to
> free
> it explicitly.

Oops, thanks.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux