Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-23 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Tue, Oct 20, 2015 at 04:53:24PM -0600, Eric Blake wrote: >> On 10/20/2015 08:46 AM, Markus Armbruster wrote: >> > Gerd Hoffmann writes: >> > >> >> Hi, >> >> >> -static VncBasicInfo *vnc_basic_info_get(struct sockaddr_storage *sa, >> -

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-21 Thread Daniel P. Berrange
On Tue, Oct 20, 2015 at 04:53:24PM -0600, Eric Blake wrote: > On 10/20/2015 08:46 AM, Markus Armbruster wrote: > > Gerd Hoffmann writes: > > > >> Hi, > >> > -static VncBasicInfo *vnc_basic_info_get(struct sockaddr_storage *sa, > -socklen_t salen

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-21 Thread Markus Armbruster
Eric Blake writes: > On 10/20/2015 08:46 AM, Markus Armbruster wrote: >> Gerd Hoffmann writes: >> >>> Hi, >>> > -static VncBasicInfo *vnc_basic_info_get(struct sockaddr_storage *sa, > -socklen_t salen) > +static void vnc_basic_info_get(struc

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-20 Thread Eric Blake
On 10/20/2015 01:38 AM, Markus Armbruster wrote: > Eric Blake writes: > >> A future qapi patch will rework generated structs with a base >> class to be unboxed. In preparation for that, change the code >> that allocates then populates an info struct to instead merely >> populate the fields of an

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-20 Thread Eric Blake
On 10/20/2015 08:46 AM, Markus Armbruster wrote: > Gerd Hoffmann writes: > >> Hi, >> -static VncBasicInfo *vnc_basic_info_get(struct sockaddr_storage *sa, -socklen_t salen) +static void vnc_basic_info_get(struct sockaddr_storage *sa, +

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-20 Thread Markus Armbruster
Gerd Hoffmann writes: > Hi, > >> > -static VncBasicInfo *vnc_basic_info_get(struct sockaddr_storage *sa, >> > -socklen_t salen) >> > +static void vnc_basic_info_get(struct sockaddr_storage *sa, >> > + socklen_t salen, >> > +

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-20 Thread Gerd Hoffmann
Hi, > > -static VncBasicInfo *vnc_basic_info_get(struct sockaddr_storage *sa, > > -socklen_t salen) > > +static void vnc_basic_info_get(struct sockaddr_storage *sa, > > + socklen_t salen, > > + Vn

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-20 Thread Markus Armbruster
Eric Blake writes: > A future qapi patch will rework generated structs with a base > class to be unboxed. In preparation for that, change the code > that allocates then populates an info struct to instead merely > populate the fields of an info field passed in as a parameter. > Add rudimentary E

[Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-15 Thread Eric Blake
A future qapi patch will rework generated structs with a base class to be unboxed. In preparation for that, change the code that allocates then populates an info struct to instead merely populate the fields of an info field passed in as a parameter. Add rudimentary Error handling for cases where t