IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 6, 2005, 10:29:08 AM (21 years ago)
Author:
eugene
Message:

fixed multicommand to parse subcommands sequentially, added modulus operator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pcontrol/GetJobOutput.c

    r4450 r4462  
    33
    44/* we read Nbytes from the host, then watch for the prompt */
    5 int GetJobOutput (char *command, Host *host, IOBuffer *buffer, int Nbytes) {
     5int GetJobOutput (char *cmd, Host *host, IOBuffer *buffer, int Nbytes) {
    66 
    77  int i, status, Nstart;
     
    1313  Nstart = buffer[0].Nbuffer;
    1414
    15   /* send command (stdout / stderr) */
    16   ALLOCATE (line, char, MAX (1, strlen(command) + 1));
    17   sprintf (line, "%s\n", command);
     15  /* send cmd (stdout / stderr) */
     16  ALLOCATE (line, char, MAX (1, strlen(cmd) + 1));
     17  sprintf (line, "%s\n", cmd);
    1818  status = write (host[0].stdin, line, strlen(line));
    1919  free (line);
     
    4646
    4747    default:
    48       fprintf (stderr, "message received (GetJobOutput : %s)\n", command); 
     48      fprintf (stderr, "message received (GetJobOutput : %s)\n", cmd); 
    4949      /* drop extra bytes from pclient (not pclient:job) */
    5050      buffer[0].Nbuffer = Nstart + Nbytes;
Note: See TracChangeset for help on using the changeset viewer.