2022-11-16 Fred Gleason <fredg@paravelsystems.com>

* Added a 'QString *err_msg' argument to 'RDDownload::runDownload()'.
	* Added a 'QString *err_msg' argument to 'RDDownload::runUpload()'.
	* Fixed regression in rdcatch(1) that caused upload and download
	events to fail to show exit status correctly.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-11-16 15:31:40 -05:00
parent 63121ab15d
commit 7beec8dba1
13 changed files with 126 additions and 187 deletions

View File

@@ -2,7 +2,7 @@
//
// Download a File
//
// (C) Copyright 2010-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2010-2022 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -116,6 +116,7 @@ RDDownload::ErrorCode RDDownload::runDownload(const QString &username,
const QString &password,
const QString &id_filename,
bool use_id_filename,
QString *curl_err_msg,
bool log_debug)
{
CURL *curl=NULL;
@@ -231,6 +232,7 @@ RDDownload::ErrorCode RDDownload::runDownload(const QString &username,
curl_err,curl_easy_strerror(curl_err));
ret=RDDownload::ErrorUnspecified;
}
*curl_err_msg=curl_easy_strerror(curl_err);
if(user!=NULL) {
RDCheckExitCode("RDDownload::runDownload seteuid",seteuid(getuid()));
RDCheckExitCode("RDDownload::runDownload getgid",setegid(getgid()));