[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 57/264: cmdline: fix handling of OperationConfig linked list (--
From: |
gnunet |
Subject: |
[gnurl] 57/264: cmdline: fix handling of OperationConfig linked list (--next) |
Date: |
Thu, 30 Apr 2020 16:06:00 +0200 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 4e0b4fee4aea25da850327e068f307e6dc5200f2
Author: Rici Lake <address@hidden>
AuthorDate: Wed Mar 18 18:28:19 2020 -0500
cmdline: fix handling of OperationConfig linked list (--next)
Ensures that -K/--config inserts new items at the end of the list
instead of overwriting the second item, and that after a -K/--config
option has been parsed, the option parser's view of the current config
is update.
Fixes #5120
Closes #5123
---
src/tool_getparam.c | 1 +
src/tool_parsecfg.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 0c555cc96..0252ee029 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -2258,6 +2258,7 @@ ParameterError parse_args(struct GlobalConfig *global,
int argc,
char *nextarg = (i < (argc - 1)) ? argv[i + 1] : NULL;
result = getparameter(flag, nextarg, &passarg, global, config);
+ config = global->last;
if(result == PARAM_NEXT_OPERATION) {
/* Reset result as PARAM_NEXT_OPERATION is only used here and not
returned from this function */
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index a9057ea31..efb9159e7 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -76,7 +76,7 @@ int parseconfig(const char *filename, struct GlobalConfig
*global)
FILE *file = NULL;
bool usedarg = FALSE;
int rc = 0;
- struct OperationConfig *operation = global->first;
+ struct OperationConfig *operation = global->last;
char *pathalloc = NULL;
if(!filename || !*filename) {
@@ -233,6 +233,7 @@ int parseconfig(const char *filename, struct GlobalConfig
*global)
fprintf(stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
#endif
res = getparameter(option, param, &usedarg, global, operation);
+ operation = global->last;
if(!res && param && *param && !usedarg)
/* we passed in a parameter that wasn't used! */
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 12/264: docs: add warnings about FILE: URLs on Windows, (continued)
- [gnurl] 12/264: docs: add warnings about FILE: URLs on Windows, gnunet, 2020/04/30
- [gnurl] 47/264: tests: make Python-based servers compatible with Python 2 and 3, gnunet, 2020/04/30
- [gnurl] 45/264: RELEASE-NOTES: synced, gnunet, 2020/04/30
- [gnurl] 48/264: openssl: remove the BACKEND define kludge, gnunet, 2020/04/30
- [gnurl] 49/264: gnutls: remove the BACKEND define kludge, gnunet, 2020/04/30
- [gnurl] 44/264: RELEASE-NOTES: synced, gnunet, 2020/04/30
- [gnurl] 51/264: wolfssl: remove the BACKEND define kludge, gnunet, 2020/04/30
- [gnurl] 33/264: ci/tests: increase timeouts for torture builds on Azure Pipelines, gnunet, 2020/04/30
- [gnurl] 59/264: ci/tests: fix Azure Pipelines not running Windows containers, gnunet, 2020/04/30
- [gnurl] 54/264: secure transport: remove the BACKEND define kludge, gnunet, 2020/04/30
- [gnurl] 57/264: cmdline: fix handling of OperationConfig linked list (--next),
gnunet <=
- [gnurl] 43/264: http2: Fix erroneous debug message that h2 connection closed, gnunet, 2020/04/30
- [gnurl] 52/264: bearssl: remove the BACKEND define kludge, gnunet, 2020/04/30
- [gnurl] 64/264: CURLINFO_NUM_CONNECTS: improve accuracy, gnunet, 2020/04/30
- [gnurl] 66/264: getinfo: provide CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE override, gnunet, 2020/04/30
- [gnurl] 16/264: ci/tests: install test suite dependencies stunnel and impacket, gnunet, 2020/04/30
- [gnurl] 69/264: cirrus: make freebsd ignore the tests instead of skipping, gnunet, 2020/04/30
- [gnurl] 71/264: RELEASE-NOTES: synced, gnunet, 2020/04/30
- [gnurl] 21/264: select: add 'timeout_ms' wrap-around precaution to Curl_select, gnunet, 2020/04/30
- [gnurl] 79/264: travis: update the ngtcp2 build to use the latest OpenSSL patch, gnunet, 2020/04/30
- [gnurl] 70/264: OS400: Update strings for ccsid-ifier, gnunet, 2020/04/30