IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2006, 2:19:21 AM (20 years ago)
Author:
eugene
Message:

adding task options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/TaskOps.c

    r7917 r8129  
    116116  gprint (GP_LOG, "\n\n");
    117117
     118  gprint (GP_LOG, "\n options: ");
     119  for (i = 0; i < task[0].optc; i++) {
     120    gprint (GP_LOG, "%s ", task[0].optv[i]);
     121  }
     122  gprint (GP_LOG, "\n\n");
     123
    118124  if (task[0].host == NULL) {
    119125    gprint (GP_LOG, " task runs locally\n");
     
    169175    free (task[0].argv);
    170176  }
     177  if (task[0].optv != NULL) {
     178    for (i = 0; i < task[0].optc; i++) {
     179      free (task[0].optv[i]);
     180    }
     181    free (task[0].optv);
     182  }
    171183  if (task[0].exec != NULL) {
    172184    FreeMacro (task[0].exec);
     
    209221  NewTask[0].argc = 0;
    210222  NewTask[0].argv = NULL;
     223
     224  NewTask[0].optc = 0;
     225  NewTask[0].optv = NULL;
    211226
    212227  NewTask[0].exec = NULL;
     
    346361  if (!strcasecmp (command, "TRANGE"))    hash = TASK_TRANGE;
    347362  if (!strcasecmp (command, "COMMAND"))   hash = TASK_COMMAND;
     363  if (!strcasecmp (command, "OPTIONS"))   hash = TASK_OPTIONS;
    348364  if (!strcasecmp (command, "PERIODS"))   hash = TASK_PERIODS;
    349365  if (!strcasecmp (command, "TASK.EXIT")) hash = TASK_EXIT;
Note: See TracChangeset for help on using the changeset viewer.