[libvirt] [PATCH 15/20] stream: Access stream->prog instead of a hard-coded global variable

Marc Hartmayer mhartmay at linux.vnet.ibm.com
Thu Mar 15 16:31:22 UTC 2018


On Thu, Mar 15, 2018 at 04:22 PM +0100, John Ferlan <jferlan at redhat.com> wrote:
> On 03/08/2018 07:20 AM, Marc Hartmayer wrote:
>> Use stream->prog instead of a hard-coded
>> virNetServerProgram. Especially since these functions are intended as
>> generic helpers for streams.
>
> Looks like you were editing your commit message and didn't reformat.  In
> essence though it seems you're making sure to use stream->prog instead
> of the hard coded "remoteProgram" that "we know" is used when the stream
> was created in daemonCreateClientStream.
>
> Is that about right?

Yep. At least for all callers of 'daemonCreateClientStream' I’ve
found. It might be useful to document the “we know” somewhere… :)

With this change it’s definitely easier to understand the code and the
daemonStream* functions can now be reused (if they’re needed somewhere).

>
>>
>> Signed-off-by: Marc Hartmayer <mhartmay at linux.vnet.ibm.com>
>> Reviewed-by: Bjoern Walk <bwalk at linux.vnet.ibm.com>
>> Reviewed-by: Boris Fiuczynski <fiuczy at linux.vnet.ibm.com>
>> ---
>>  src/remote/remote_daemon_stream.c | 14 +++++++-------
>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>
>
> Reviewed-by: John Ferlan <jferlan at redhat.com>
>
> John
>
--
Beste Grüße / Kind regards
   Marc Hartmayer

IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294





More information about the libvir-list mailing list