devc->samples_sent = 0;
devc->bytes_received = 0;
- /* Send header packet to the session bus. */
std_session_send_df_header(sdi, LOG_PREFIX);
/* Hook up a dummy handler to receive data from the device. */
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
- struct sr_datafeed_packet packet;
-
(void)cb_data;
if (sdi->status != SR_ST_ACTIVE)
sr_dbg("Stopping acquisition.");
sr_session_source_remove(sdi->session, -1);
- /* Send end packet to the session bus. */
- sr_dbg("Sending SR_DF_END.");
- packet.type = SR_DF_END;
- sr_session_send(sdi, &packet);
+ std_session_send_df_end(sdi, LOG_PREFIX);
return SR_OK;
}