summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/network.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-04 11:40:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-04 11:40:16 +0000
commit28799498ed2b2253aaa68dbb74be9612b9cd3d64 (patch)
tree3339e46540c17b1a5e07fc70b227074db59fff8a /mdk-stage1/network.c
parent94e2ebc3294bb23855db3b9acabe6df9f2801df9 (diff)
downloaddrakx-backup-do-not-use-28799498ed2b2253aaa68dbb74be9612b9cd3d64.tar
drakx-backup-do-not-use-28799498ed2b2253aaa68dbb74be9612b9cd3d64.tar.gz
drakx-backup-do-not-use-28799498ed2b2253aaa68dbb74be9612b9cd3d64.tar.bz2
drakx-backup-do-not-use-28799498ed2b2253aaa68dbb74be9612b9cd3d64.tar.xz
drakx-backup-do-not-use-28799498ed2b2253aaa68dbb74be9612b9cd3d64.zip
create str_ftp_error()
Diffstat (limited to 'mdk-stage1/network.c')
-rw-r--r--mdk-stage1/network.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index 8bad63c93..17c39dc96 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -999,17 +999,9 @@ enum return_type ftp_prepare(void)
}
if (fd < 0) {
- log_message("FTP: error get %d", fd);
- if (fd == FTPERR_PASSIVE_ERROR)
- stg1_error_message("Error: error with passive connection.");
- else if (fd == FTPERR_FAILED_CONNECT)
- stg1_error_message("Error: couldn't connect to server.");
- else if (fd == FTPERR_FILE_NOT_FOUND)
- stg1_error_message("Error: file not found (%s).", location_full);
- else if (fd == FTPERR_BAD_SERVER_RESPONSE)
- stg1_error_message("Error: bad server response (server too busy?).");
- else
- stg1_error_message("Error: couldn't retrieve Installation program.");
+ char *msg = str_ftp_error(fd);
+ log_message("FTP: error get %d for remote file %s", fd, location_full);
+ stg1_error_message("Error: %s.", msg ? msg : "couldn't retrieve Installation program");
results = RETURN_BACK;
continue;
}