Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-20 Thread Luiz Capitulino
On Wed, 20 Mar 2013 14:37:59 +0100 Kevin Wolf wrote: > Am 20.03.2013 um 13:57 hat Luiz Capitulino geschrieben: > > On Wed, 20 Mar 2013 09:39:34 +0100 > > Kevin Wolf wrote: > > > > > Am 19.03.2013 um 21:34 hat Luiz Capitulino geschrieben: > > > > inet_connect_addr() has two users: inet_connect_o

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-20 Thread Kevin Wolf
Am 20.03.2013 um 13:57 hat Luiz Capitulino geschrieben: > On Wed, 20 Mar 2013 09:39:34 +0100 > Kevin Wolf wrote: > > > Am 19.03.2013 um 21:34 hat Luiz Capitulino geschrieben: > > > inet_connect_addr() has two users: inet_connect_opts() and > > > wait_for_connect(), > > > with this patch both of

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-20 Thread Luiz Capitulino
On Wed, 20 Mar 2013 09:39:34 +0100 Kevin Wolf wrote: > Am 19.03.2013 um 21:34 hat Luiz Capitulino geschrieben: > > On Wed, 06 Mar 2013 15:46:45 +0100 > > Laszlo Ersek wrote: > > > > > On 03/06/13 12:11, Kevin Wolf wrote: > > > > Am 06.03.2013 um 12:04 hat Paolo Bonzini geschrieben: > > > >> Il

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-20 Thread Kevin Wolf
Am 19.03.2013 um 21:34 hat Luiz Capitulino geschrieben: > On Wed, 06 Mar 2013 15:46:45 +0100 > Laszlo Ersek wrote: > > > On 03/06/13 12:11, Kevin Wolf wrote: > > > Am 06.03.2013 um 12:04 hat Paolo Bonzini geschrieben: > > >> Il 06/03/2013 11:48, Kevin Wolf ha scritto: > > >>> inet_connect_opts()

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-19 Thread Luiz Capitulino
On Wed, 06 Mar 2013 15:46:45 +0100 Laszlo Ersek wrote: > On 03/06/13 12:11, Kevin Wolf wrote: > > Am 06.03.2013 um 12:04 hat Paolo Bonzini geschrieben: > >> Il 06/03/2013 11:48, Kevin Wolf ha scritto: > >>> inet_connect_opts() tries all possible addrinfos returned by > >>> getaddrinfo(). If one f

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Paolo Bonzini
Il 06/03/2013 16:59, Markus Armbruster ha scritto: >> > >> > I don't really understand the difference. As long as the function >> > doesn't depend on the Error object to be present (which it doesn't), >> > isn't it semantically exactly the same? > I guess it is in this case (I didn't call your patc

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Laszlo Ersek
On 03/06/13 16:47, Kevin Wolf wrote: > Am 06.03.2013 um 16:38 hat Laszlo Ersek geschrieben: >> Of course one wonders why a caller would pass in a preexistent Error. > > Thanks, Laszlo, now I think I understand what Paolo and you were > suggesting. > > However, I'd call any such caller buggy and

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Markus Armbruster
Kevin Wolf writes: > Am 06.03.2013 um 16:04 hat Paolo Bonzini geschrieben: >> Il 06/03/2013 15:46, Laszlo Ersek ha scritto: >> >> > We could assert(!error_is_set(errp)) if we wanted. As soon as you've got >> >> > an Error, you must return instead of calling more functions with the >> >> > same er

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Kevin Wolf
Am 06.03.2013 um 16:38 hat Laszlo Ersek geschrieben: > On 03/06/13 16:19, Kevin Wolf wrote: > > Am 06.03.2013 um 16:04 hat Paolo Bonzini geschrieben: > >> Il 06/03/2013 15:46, Laszlo Ersek ha scritto: > > We could assert(!error_is_set(errp)) if we wanted. As soon as you've got > > an Error,

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Laszlo Ersek
On 03/06/13 16:19, Kevin Wolf wrote: > Am 06.03.2013 um 16:04 hat Paolo Bonzini geschrieben: >> Il 06/03/2013 15:46, Laszlo Ersek ha scritto: > We could assert(!error_is_set(errp)) if we wanted. As soon as you've got > an Error, you must return instead of calling more functions with the >>>

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Kevin Wolf
Am 06.03.2013 um 16:04 hat Paolo Bonzini geschrieben: > Il 06/03/2013 15:46, Laszlo Ersek ha scritto: > >> > We could assert(!error_is_set(errp)) if we wanted. As soon as you've got > >> > an Error, you must return instead of calling more functions with the > >> > same error pointer. > > I think Lu

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Markus Armbruster
Kevin Wolf writes: > Am 06.03.2013 um 12:04 hat Paolo Bonzini geschrieben: >> Il 06/03/2013 11:48, Kevin Wolf ha scritto: >> > inet_connect_opts() tries all possible addrinfos returned by >> > getaddrinfo(). If one fails with an error, the next one is tried. In >> > this case, the Error should be

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Paolo Bonzini
Il 06/03/2013 15:46, Laszlo Ersek ha scritto: >> > We could assert(!error_is_set(errp)) if we wanted. As soon as you've got >> > an Error, you must return instead of calling more functions with the >> > same error pointer. > I think Luiz would suggest (*) to receive any error into a > NULL-initiali

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Laszlo Ersek
On 03/06/13 12:11, Kevin Wolf wrote: > Am 06.03.2013 um 12:04 hat Paolo Bonzini geschrieben: >> Il 06/03/2013 11:48, Kevin Wolf ha scritto: >>> inet_connect_opts() tries all possible addrinfos returned by >>> getaddrinfo(). If one fails with an error, the next one is tried. In >>> this case, the Er

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Kevin Wolf
Am 06.03.2013 um 12:04 hat Paolo Bonzini geschrieben: > Il 06/03/2013 11:48, Kevin Wolf ha scritto: > > inet_connect_opts() tries all possible addrinfos returned by > > getaddrinfo(). If one fails with an error, the next one is tried. In > > this case, the Error should be discarded because the whol

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure

2013-03-06 Thread Paolo Bonzini
Il 06/03/2013 11:48, Kevin Wolf ha scritto: > inet_connect_opts() tries all possible addrinfos returned by > getaddrinfo(). If one fails with an error, the next one is tried. In > this case, the Error should be discarded because the whole operation is > successful if another addrinfo from the list