X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Fprotocol.c;h=986aa6121d55a57877ef71c99371811193ab487a;hb=24f4a9d50bb93c83cf610a789d0f618970f454ef;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..986aa612 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); 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. */ - ret = std_session_send_df_header(sdi, LOG_PREFIX); - } + if (ret == SR_OK) + ret = std_session_send_df_header(sdi); + if (ret != SR_OK) { usb_source_remove(sdi->session, drvc->sr_ctx); clear_acquisition_state(sdi);