Commit f3566898 authored by Steve Holme's avatar Steve Holme
Browse files

tool_cfgable: Added support for knowing the current operation

parent e904b15f
Loading
Loading
Loading
Loading
+1 −0
Changes for src/tool_cfgable.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ struct GlobalConfig {
  CURL *easy;                     /* Once we have one, we keep it here */

  struct OperationConfig *first;
  struct OperationConfig *current;
  struct OperationConfig *last;   /* Always last in the struct */
};

+5 −5
Changes for src/tool_operate.c: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -1831,14 +1831,14 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
        operation = operation->next;
      }

      /* Reset the operation pointer */
      operation = config->first;
      /* Set the current operation pointer */
      config->current = config->first;

      /* Perform each operation */
      while(!result && operation) {
        result = operate_do(operation);
      while(!result && config->current) {
        result = operate_do(config->current);

        operation = operation->next;
        config->current = config->current->next;
      }
    }
  }