X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Fprotocol.c;h=b4c3171e240ceb73dc3cbc3337085045a4efa534;hb=1c47e0da8f2571bc34dbdc368c3c1f55318c3aa0;hp=20cf10f9c5fabc81b2cf9329e8babc778ae3a6e4;hpb=d64b5f43ccaab6d490da05b84fa9b31b7cccfcb7;p=libsigrok.git diff --git a/src/hardware/sysclk-lwla/protocol.c b/src/hardware/sysclk-lwla/protocol.c index 20cf10f9..b4c3171e 100644 --- a/src/hardware/sysclk-lwla/protocol.c +++ b/src/hardware/sysclk-lwla/protocol.c @@ -277,7 +277,6 @@ static int transfer_event(int fd, int revents, void *cb_data) struct dev_context *devc; struct drv_context *drvc; struct timeval tv; - struct sr_datafeed_packet packet; int ret; (void)fd; @@ -317,10 +316,7 @@ static int transfer_event(int fd, int revents, void *cb_data) /* We are done, clean up and send end packet to session bus. */ clear_acquisition_state(sdi); - - packet.type = SR_DF_END; - packet.payload = NULL; - sr_session_send(sdi, &packet); + std_session_send_df_end(sdi, LOG_PREFIX); return G_SOURCE_REMOVE; } @@ -577,10 +573,9 @@ SR_PRIV int lwla_start_acquisition(const struct sr_dev_inst *sdi) } ret = submit_request(sdi, STATE_START_CAPTURE); - if (ret == SR_OK) { - /* Send header packet to the session bus. */ + if (ret == SR_OK) ret = std_session_send_df_header(sdi, LOG_PREFIX); - } + if (ret != SR_OK) { usb_source_remove(sdi->session, drvc->sr_ctx); clear_acquisition_state(sdi);