mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-10-03 23:38:25 +00:00
curl: Remove unused code
req_version and curr_version in curl.c weren't used anywhere. Probably this is a left over. Removing them.
This commit is contained in:
committed by
Matthew Johnson
parent
372fc39781
commit
5d30df9daf
@@ -63,7 +63,6 @@ int list_installable_bundles()
|
||||
fprintf(stderr, "Error: Unable to determine current OS version\n");
|
||||
return ECURRENT_VERSION;
|
||||
}
|
||||
swupd_curl_set_current_version(current_version);
|
||||
|
||||
mix_exists = (check_mix_exists() & system_on_mix());
|
||||
MoM = load_mom(current_version, false, mix_exists);
|
||||
@@ -97,7 +96,6 @@ static int load_bundle_manifest(const char *bundle_name, struct list *subs, int
|
||||
|
||||
*submanifest = NULL;
|
||||
|
||||
swupd_curl_set_current_version(version);
|
||||
mom = load_mom(version, false, false);
|
||||
if (!mom) {
|
||||
return EMOM_NOTFOUND;
|
||||
@@ -453,8 +451,6 @@ int remove_bundle(const char *bundle_name)
|
||||
|
||||
mix_exists = (check_mix_exists() & system_on_mix());
|
||||
|
||||
swupd_curl_set_current_version(current_version);
|
||||
|
||||
current_mom = load_mom(current_version, false, mix_exists);
|
||||
if (!current_mom) {
|
||||
fprintf(stderr, "Unable to download/verify %d Manifest.MoM\n", current_version);
|
||||
@@ -852,8 +848,6 @@ int install_bundles_frontend(char **bundles)
|
||||
|
||||
mix_exists = (check_mix_exists() & system_on_mix());
|
||||
|
||||
swupd_curl_set_current_version(current_version);
|
||||
|
||||
mom = load_mom(current_version, false, mix_exists);
|
||||
if (!mom) {
|
||||
fprintf(stderr, "Cannot load official manifest MoM for version %i\n", current_version);
|
||||
|
||||
-12
@@ -48,8 +48,6 @@
|
||||
|
||||
static CURL *curl = NULL;
|
||||
|
||||
static int curr_version = -1;
|
||||
static int req_version = -1;
|
||||
static bool resume_download_enabled = true;
|
||||
|
||||
/* these are used to handle alternative trust locations */
|
||||
@@ -196,16 +194,6 @@ void swupd_curl_deinit(void)
|
||||
curl_global_cleanup();
|
||||
}
|
||||
|
||||
void swupd_curl_set_current_version(int v)
|
||||
{
|
||||
curr_version = v;
|
||||
}
|
||||
|
||||
void swupd_curl_set_requested_version(int v)
|
||||
{
|
||||
req_version = v;
|
||||
}
|
||||
|
||||
static size_t filesize_from_header_cb(void UNUSED_PARAM *func, size_t size, size_t nmemb, void UNUSED_PARAM *data)
|
||||
{
|
||||
/* Drop the header, we just want file size */
|
||||
|
||||
@@ -792,8 +792,6 @@ static int download_manifests(struct manifest **MoM, struct list **subs)
|
||||
return ECURRENT_VERSION;
|
||||
}
|
||||
|
||||
swupd_curl_set_current_version(current_version);
|
||||
|
||||
*MoM = load_mom(current_version, false, false);
|
||||
if (!(*MoM)) {
|
||||
fprintf(stderr, "Cannot load official manifest MoM for version %i\n", current_version);
|
||||
|
||||
@@ -299,8 +299,6 @@ extern int update_device_latest_version(int version);
|
||||
extern int swupd_curl_init(void);
|
||||
extern void swupd_curl_deinit(void);
|
||||
extern int swupd_curl_check_network(void);
|
||||
extern void swupd_curl_set_current_version(int v);
|
||||
extern void swupd_curl_set_requested_version(int v);
|
||||
extern double swupd_query_url_content_size(char *url);
|
||||
extern CURLcode swupd_download_file_start(struct file *file);
|
||||
extern CURLcode swupd_download_file_complete(CURLcode curl_ret, struct file *file);
|
||||
|
||||
@@ -164,7 +164,6 @@ int check_versions(int *current_version,
|
||||
fprintf(stderr, "Update of dev build not supported %d\n", *current_version);
|
||||
return -1;
|
||||
}
|
||||
swupd_curl_set_current_version(*current_version);
|
||||
|
||||
/* set preferred version and content server urls */
|
||||
if (*current_version < 0) {
|
||||
@@ -182,8 +181,6 @@ int check_versions(int *current_version,
|
||||
}
|
||||
}
|
||||
|
||||
swupd_curl_set_requested_version(*server_version);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user