X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=session_driver.c;h=e73411d521fa0fe74118e4c5df7753367410eec7;hb=b4bd70889f3009f5d836a9bf701725a6aceac039;hp=9f87c8e058f5f040ec87c4c26b3dda98eddad2a7;hpb=a2e464604ca19c1a41b8e94625971eb3818c9090;p=libsigrok.git diff --git a/session_driver.c b/session_driver.c index 9f87c8e0..e73411d5 100644 --- a/session_driver.c +++ b/session_driver.c @@ -27,7 +27,9 @@ #include "libsigrok-internal.h" /* size of payloads sent across the session bus */ +/** @cond PRIVATE */ #define CHUNKSIZE (512 * 1024) +/** @endcond */ struct session_vdev { char *sessionfile; @@ -98,6 +100,7 @@ static int receive_data(int fd, int revents, void *cb_data) if (!got_data) { packet.type = SR_DF_END; sr_session_send(cb_data, &packet); + sr_session_source_remove(-1); } return TRUE; @@ -121,8 +124,6 @@ static int hw_cleanup(void) g_slist_free(dev_insts); dev_insts = NULL; - sr_session_source_remove(-1); - return SR_OK; } @@ -270,6 +271,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, return SR_OK; } +/** @private */ SR_PRIV struct sr_dev_driver session_driver = { .name = "session", .longname = "Session-emulating driver",