X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fdemo%2Fdemo.c;h=50780214d72787a0da64e5223412128d879e2abb;hb=1c47e0da8f2571bc34dbdc368c3c1f55318c3aa0;hp=e7948cdc4a89f7e175506f86683c6e2ae6d2e79f;hpb=600cc1a8a5714da133a4a6b91b792f8416baa0ae;p=libsigrok.git diff --git a/src/hardware/demo/demo.c b/src/hardware/demo/demo.c index e7948cdc..50780214 100644 --- a/src/hardware/demo/demo.c +++ b/src/hardware/demo/demo.c @@ -868,7 +868,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) sr_session_source_add(sdi->session, -1, 0, 100, prepare_data, (struct sr_dev_inst *)sdi); - /* Send header packet to the session bus. */ std_session_send_df_header(sdi, LOG_PREFIX); /* We use this timestamp to decide how many more samples to send. */ @@ -880,17 +879,11 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - struct sr_datafeed_packet packet; - (void)cb_data; sr_dbg("Stopping acquisition."); - sr_session_source_remove(sdi->session, -1); - - /* Send last packet. */ - packet.type = SR_DF_END; - sr_session_send(sdi, &packet); + std_session_send_df_end(sdi, LOG_PREFIX); return SR_OK; }