mirror of
https://github.com/moparisthebest/curl
synced 2025-01-09 13:08:00 -05:00
tool_cfgable: Added support for knowing the current operation
This commit is contained in:
parent
e904b15f21
commit
f35668985e
@ -224,6 +224,7 @@ struct GlobalConfig {
|
|||||||
CURL *easy; /* Once we have one, we keep it here */
|
CURL *easy; /* Once we have one, we keep it here */
|
||||||
|
|
||||||
struct OperationConfig *first;
|
struct OperationConfig *first;
|
||||||
|
struct OperationConfig *current;
|
||||||
struct OperationConfig *last; /* Always last in the struct */
|
struct OperationConfig *last; /* Always last in the struct */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1831,14 +1831,14 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
|
|||||||
operation = operation->next;
|
operation = operation->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset the operation pointer */
|
/* Set the current operation pointer */
|
||||||
operation = config->first;
|
config->current = config->first;
|
||||||
|
|
||||||
/* Perform each operation */
|
/* Perform each operation */
|
||||||
while(!result && operation) {
|
while(!result && config->current) {
|
||||||
result = operate_do(operation);
|
result = operate_do(config->current);
|
||||||
|
|
||||||
operation = operation->next;
|
config->current = config->current->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user