about summary refs log tree commit homepage
path: root/upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'upgrade.c')
-rw-r--r--upgrade.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/upgrade.c b/upgrade.c
index 1c69dee..15772ab 100644
--- a/upgrade.c
+++ b/upgrade.c
@@ -58,16 +58,16 @@ void mog_upgrade_prepare(int argc, char *argv[], char *envp[])
 }
 
 /* writes one comma-delimited fd to fp */
-static bool emit_fd(FILE *fp, int fd)
+static bool emit_fd(FILE *fp, struct mog_fd *mfd)
 {
         int r;
 
         /* no error, just the FD isn't used */
-        if (fd < 0)
+        if (mfd == NULL)
                 return true;
 
         errno = 0;
-        r = fprintf(fp, "%d,", fd);
+        r = fprintf(fp, "%d,", mfd->fd);
         if (r > 0)
                 return true;
         if (errno == 0)
@@ -81,9 +81,9 @@ static bool svc_emit_fd_i(void *svcptr, void *_fp)
         FILE *fp = _fp;
         struct mog_svc *svc = svcptr;
 
-        return (emit_fd(fp, svc->mgmt_fd)
-                && emit_fd(fp, svc->http_fd)
-                && emit_fd(fp, svc->httpget_fd));
+        return (emit_fd(fp, svc->mgmt_mfd)
+                && emit_fd(fp, svc->http_mfd)
+                && emit_fd(fp, svc->httpget_mfd));
 }
 
 /* returns the PID of the newly spawned child */