X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fopenbench-logic-sniffer%2Fprotocol.c;fp=hardware%2Fopenbench-logic-sniffer%2Fprotocol.c;h=7b5ea6a51067566f85c66f2de2bac2801fc087ab;hb=264c99eda2084659492c18e0e7d0e662319053d9;hp=65e89e93820f5e629b513d528cafedd6f5036c93;hpb=9f5d4c3cc31bf6dd3ceac62dc8f5266c5f1189cf;p=libsigrok.git diff --git a/hardware/openbench-logic-sniffer/protocol.c b/hardware/openbench-logic-sniffer/protocol.c index 65e89e93..7b5ea6a5 100644 --- a/hardware/openbench-logic-sniffer/protocol.c +++ b/hardware/openbench-logic-sniffer/protocol.c @@ -381,8 +381,8 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data) * longer than it takes to send a byte, that means it's * finished. We'll double that to 30ms to be sure... */ - sr_source_remove(fd); - sr_source_add(fd, G_IO_IN, 30, ols_receive_data, cb_data); + serial_source_remove(serial); + serial_source_add(serial, G_IO_IN, 30, ols_receive_data, cb_data); devc->raw_sample_buf = g_try_malloc(devc->limit_samples * 4); if (!devc->raw_sample_buf) { sr_err("Sample buffer malloc failed.");