IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 14, 2005, 8:18:09 AM (21 years ago)
Author:
eugene
Message:

updating user commands

File:
1 edited

Legend:

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

    r4539 r4552  
    11# include "scheduler.h"
    22
    3 int controller_host (int argc, char **argv) {
     3int controller_status (int argc, char **argv) {
    44
    55  int status;
     
    88
    99  if (argc != 3) {
    10     fprintf (stderr, "USAGE: controller host (hostname)\n");
     10    fprintf (stderr, "USAGE: controller status\n");
    1111    return (FALSE);
    1212  }
    1313
    14   /* start controller connection (if needed) */
    15   StartController ();
     14  /* check if controller is running */
     15  status = CheckControllerStatus ();
     16  if (!status) {
     17    fprintf (stderr, "controller is not running\n");
     18    return (TRUE);
     19  }
    1620
    17   sprintf (command, "host %s", argv[2]);
     21  sprintf (command, "status");
    1822  InitIOBuffer (&buffer, 0x100);
    1923  status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
     
    3236    case CONTROLLER_GOOD:
    3337      fprintf (stderr, "controller command sent\n"); 
     38      fwrite (buffer.buffer, 1, buffer.Nbuffer, stderr);
    3439      return (TRUE);
    3540
Note: See TracChangeset for help on using the changeset viewer.