]> git.ipfire.org Git - pakfire.git/commitdiff
xfer: Remove more dead code
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Jun 2025 09:31:20 +0000 (09:31 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Jun 2025 09:31:20 +0000 (09:31 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/xfer.c

index bda1b60f3cac0a931fbffd6c704204fc4a11a0e7..a88cb82ce6afbf36e279c77fcf4ed1e57e4f031d 100644 (file)
@@ -1832,39 +1832,3 @@ pakfire_xfer_error_code_t pakfire_xfer_run(struct pakfire_xfer* xfer, int flags)
 
        return r;
 }
-
-static int pakfire_xfer_handle_api_error(
-               struct pakfire_xfer* xfer, const struct json_object* error) {
-       struct json_object* message = NULL;
-       struct json_object* code = NULL;
-       const char* m = NULL;
-       unsigned int c = 0;
-
-       // Fetch the URL
-       const char* url = pakfire_xfer_get_effective_url(xfer);
-
-       // Fetch the code
-       if (!json_object_object_get_ex(error, "code", &code))
-               return -EBADMSG;
-
-       // Check if the code is an integer
-       if (!json_object_is_type(code, json_type_int))
-               return -EBADMSG;
-
-       // Fetch the message
-       if (!json_object_object_get_ex(error, "message", &message))
-               return -EBADMSG;
-
-       // Check if the message is a string
-       if (!json_object_is_type(message, json_type_string))
-               return -EBADMSG;
-
-       c = json_object_get_uint64(code);
-       m = json_object_get_string(message);
-
-       // Log the error
-       ERROR(xfer->ctx, "%s responded with error %u (%s):\n  %s\n",
-               url, c, strerror(c), m);
-
-       return -c;
-}