diff options
author | Juan Quintela <quintela@redhat.com> | 2011-02-23 20:17:45 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2011-10-20 13:23:51 +0200 |
commit | 4fc7d8195f9c8433f8661b6156e5c57ff8d8e4fb (patch) | |
tree | e5b1d4e22c4c622e6c97766a93356b9d1df70c34 | |
parent | 2350e13c93c28f717e2ba1b31560b49ac6f81d4d (diff) |
migration: If there is one error, it makes no sense to continue
Once there, add a comment about what each error mean.
Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r-- | buffered_file.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/buffered_file.c b/buffered_file.c index 486af575d5..94ecbbcea1 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -189,13 +189,19 @@ static int buffered_close(void *opaque) return ret; } +/* + * The meaning of the return values is: + * 0: We can continue sending + * 1: Time to stop + * -1: There has been an error + */ static int buffered_rate_limit(void *opaque) { QEMUFileBuffered *s = opaque; - if (s->has_error) - return 0; - + if (s->has_error) { + return -1; + } if (s->freeze_output) return 1; |