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>
master
Juan Quintela 2011-02-23 20:17:45 +01:00
parent 2350e13c93
commit 4fc7d8195f
1 changed files with 9 additions and 3 deletions

View File

@ -189,13 +189,19 @@ static int buffered_close(void *opaque)
return ret; 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) static int buffered_rate_limit(void *opaque)
{ {
QEMUFileBuffered *s = opaque; QEMUFileBuffered *s = opaque;
if (s->has_error) if (s->has_error) {
return 0; return -1;
}
if (s->freeze_output) if (s->freeze_output)
return 1; return 1;