Skip to content
  • Gerhard Sittig's avatar
    scpi: Rephrase buffer resize for free space during SCPI read, add comments · ad21865f
    Gerhard Sittig authored
    Routine sr_scpi_get_data() checks for free space in the receive buffer,
    and resizes the buffer when free space drops below a threshold. The
    previous logic assumed that the resize and the read logic would interact
    in some specific way to achieve the desired operation.
    
    Adjust the buffer resize such that more free space is pre-allocated, yet
    the payload size of the buffer is not affected. This eliminates the
    dependency of the optional resize logic from subsequent activity for
    reception of data that is non-optional.
    
    Add comments while we are here, outline the steps taken in the
    sr_scpi_get_data() routine.
    ad21865f