Revision 4fc7d819
b/buffered_file.c | ||
---|---|---|
189 | 189 |
return ret; |
190 | 190 |
} |
191 | 191 |
|
192 |
/* |
|
193 |
* The meaning of the return values is: |
|
194 |
* 0: We can continue sending |
|
195 |
* 1: Time to stop |
|
196 |
* -1: There has been an error |
|
197 |
*/ |
|
192 | 198 |
static int buffered_rate_limit(void *opaque) |
193 | 199 |
{ |
194 | 200 |
QEMUFileBuffered *s = opaque; |
195 | 201 |
|
196 |
if (s->has_error) |
|
197 |
return 0;
|
|
198 |
|
|
202 |
if (s->has_error) {
|
|
203 |
return -1;
|
|
204 |
} |
|
199 | 205 |
if (s->freeze_output) |
200 | 206 |
return 1; |
201 | 207 |
|
Also available in: Unified diff