Changeset 37403 for branches/eam_branches/ps2-tc3-20130727/Ohana/src/opihi/pcontrol/PclientCommand.c
- Timestamp:
- Sep 19, 2014, 4:05:27 PM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/Ohana
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/Ohana/src/opihi/pcontrol/PclientCommand.c
r27435 r37403 25 25 return (PCLIENT_DOWN); 26 26 } 27 27 28 28 // prepare host to accept response 29 29 host[0].response_state = response_state; … … 35 35 return (PCLIENT_GOOD); 36 36 } 37 37 38 38 // check for response; message must end with specified string. 39 39 // accumulate the response in the buffer … … 47 47 ASSERT (response != NULL, "response missing"); 48 48 ASSERT (buffer != NULL, "buffer missing"); 49 50 // INITTIME; 49 51 50 52 /* avoid blocking very long on read, test every 100 usec, up to 0.1 sec */ … … 66 68 return (PCLIENT_DOWN); 67 69 } 68 if (line == NULL) return (PCLIENT_HUNG); 69 if (status == -1) return (PCLIENT_HUNG); 70 if (line == NULL) { 71 // MARKTIME ("-- client hung (line NULL): %s : %f sec\n", host[0].hostname, dtime); 72 return (PCLIENT_HUNG); 73 } 74 if (status == -1) { 75 // MARKTIME ("-- client hung (status -1): %s : %f sec\n", host[0].hostname, dtime); 76 return (PCLIENT_HUNG); 77 } 70 78 71 79 // fprintf (stderr, "response: %s\n", buffer[0].buffer); … … 75 83 76 84 /* memstr returns a view, not an allocated string : don't free */ 77 /* ReadtoIOBuffer returns : 85 /* ReadtoIOBuffer returns : 78 86 0 - pipe closed 79 87 -1 - no more data in pipe, data not ready
Note:
See TracChangeset
for help on using the changeset viewer.
