]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
import: fix AlreadyInProgress Varlink error missing remote field
authornoxiouz <atiurin@proton.me>
Fri, 27 Feb 2026 00:02:12 +0000 (00:02 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 12 Mar 2026 20:13:23 +0000 (20:13 +0000)
The handler sends the remote URL as a parameter via sd_varlink_errorbo()
but the IDL declared the error with no fields, making the payload
undiscoverable via introspection.

(cherry picked from commit c22a131e7438098e24239e8ed21a64ffb20631cc)
(cherry picked from commit 86586394fcf13129cf0cdb5fd75daebfdf9b873d)
(cherry picked from commit 66d294a24f524cc49283679997d9885bdcb696bf)

src/shared/varlink-io.systemd.Import.c

index 66030e63fc004b0d1bb1f69ad8cdb0375ae907d3..250b2ec469cfdc1e52e2478b7a0733302bf39064 100644 (file)
@@ -99,7 +99,10 @@ static SD_VARLINK_DEFINE_METHOD_FULL(
                 SD_VARLINK_FIELD_COMMENT("The numeric ID of this download"),
                 SD_VARLINK_DEFINE_OUTPUT(id, SD_VARLINK_INT, SD_VARLINK_NULLABLE));
 
-static SD_VARLINK_DEFINE_ERROR(AlreadyInProgress);
+static SD_VARLINK_DEFINE_ERROR(
+                AlreadyInProgress,
+                SD_VARLINK_FIELD_COMMENT("The URL of the transfer already in progress."),
+                SD_VARLINK_DEFINE_FIELD(remote, SD_VARLINK_STRING, 0));
 static SD_VARLINK_DEFINE_ERROR(TransferCancelled);
 static SD_VARLINK_DEFINE_ERROR(TransferFailed);
 static SD_VARLINK_DEFINE_ERROR(NoTransfers);