Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
struct pakfire_httpclient* c = NULL;
int r;
- // Fail if the context is flagged as offline
- if (pakfire_ctx_has_flag(ctx, PAKFIRE_CTX_OFFLINE)) {
- CTX_ERROR(ctx, "Cannot initialize downloader in offline mode\n");
- return -EPERM;
- }
-
// Allocate a new object
c = calloc(1, sizeof(*c));
if (!c)
char buffer[PATH_MAX];
int r;
+ // Fail if the context is flagged as offline
+ if (pakfire_ctx_has_flag(ctx, PAKFIRE_CTX_OFFLINE)) {
+ CTX_ERROR(ctx, "Cannot initialize a transfer in offline mode\n");
+ return -EPERM;
+ }
+
// Format the URL
r = __pakfire_string_vformat(buffer, sizeof(buffer), url, args);
if (r < 0)