IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2005, 7:51:09 AM (21 years ago)
Author:
eugene
Message:

added test of exit/crash job stacks

File:
1 edited

Legend:

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

    r4705 r4706  
    2222  InitIOBuffer (&buffer, 0x100);
    2323  status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
     24  if (status) fwrite (buffer.buffer, 1, buffer.Nbuffer, stderr);
     25  FreeIOBuffer (&buffer);
     26  return (TRUE);
    2427
    25   /* check on success of controller command */
    26   switch (status) {
    27     case CONTROLLER_DOWN:
    28       fprintf (stderr, "controller is down\n");
    29       FreeIOBuffer (&buffer);
    30       return (FALSE);
    31 
    32     case CONTROLLER_HUNG:
    33       fprintf (stderr, "controller is not responding\n");
    34       FreeIOBuffer (&buffer);
    35       return (FALSE);
    36 
    37     case CONTROLLER_GOOD:
    38       fwrite (buffer.buffer, 1, buffer.Nbuffer, stderr);
    39       FreeIOBuffer (&buffer);
    40       return (TRUE);
    41 
    42     default:
    43       fprintf (stderr, "unknown status for controller command: programming error\n"); 
    44       exit (1);
    45   }
    46 
    47   fprintf (stderr, "programming error: should not reach here\n"); 
    48   exit (1);
    4928}
Note: See TracChangeset for help on using the changeset viewer.