| 483 | struct bundle_list *list); |
| 484 | |
| 485 | static int download_bundle_to_file(struct remote_bundle_info *bundle, void *data) |
| 486 | { |
| 487 | int res; |
| 488 | struct bundle_list_context *ctx = data; |
| 489 | |
| 490 | if (ctx->mode == BUNDLE_MODE_ANY && ctx->count) |
| 491 | return 0; |
| 492 | |
| 493 | res = fetch_bundle_uri_internal(ctx->r, bundle, ctx->depth + 1, ctx->list); |
| 494 | |
| 495 | /* |
| 496 | * Only increment count if the download succeeded. If our mode is |
| 497 | * BUNDLE_MODE_ANY, then we will want to try other URIs in the |
| 498 | * list in case they work instead. |
| 499 | */ |
| 500 | if (!res) |
| 501 | ctx->count++; |
| 502 | |
| 503 | /* |
| 504 | * To be opportunistic as possible, we continue iterating and |
| 505 | * download as many bundles as we can, so we can apply the ones |
| 506 | * that work, even in BUNDLE_MODE_ALL mode. |
| 507 | */ |
| 508 | return 0; |
| 509 | } |
| 510 | |
| 511 | struct bundles_for_sorting { |
| 512 | struct remote_bundle_info **items; |
nothing calls this directly
no test coverage detected