/* Routine to send a string of bits and get another string back */ static GOOD_OR_BAD DS9097_send_and_get(const BYTE * bussend, BYTE * busget, const size_t length, struct connection_in * in) { switch( in->pown->type ) { case ct_telnet: RETURN_BAD_IF_BAD( telnet_write_binary( bussend, length, in) ) ; break ; case ct_serial: default: RETURN_BAD_IF_BAD( COM_write( bussend, length, in ) ) ; break ; } /* get back string -- with timeout and partial read loop */ return COM_read( busget, length, in ) ; }
static GOOD_OR_BAD LINK_read_true_length(BYTE * buf, size_t size, struct connection_in *in) { return COM_read( buf, size, in ) ; }