tools/libxl: Do not fire the stream callback multiple times
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 27 Jul 2015 16:47:26 +0000 (17:47 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 28 Jul 2015 13:02:18 +0000 (14:02 +0100)
commit44313ab77f3e3c5b566ea4f23b0e32bfd5eafa29
tree01f2a71f5ace3f567f6c7020330c06f5cd2c02ac
parent4d3e1ee37e12c13a9cefb9b1442fa4148363a6f4
tools/libxl: Do not fire the stream callback multiple times

Avoid stacking of check_all_finished() via synchronous teardown of
tasks.  If the _abort() functions call back synchronously,
stream->completion_callback() ends up getting called twice, as first
and last check_all_finished() frames observe each task being finished.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_internal.h
tools/libxl/libxl_stream_read.c
tools/libxl/libxl_stream_write.c