ols: Use serial source management wrappers.

This commit is contained in:
Martin Ling 2013-12-30 04:00:41 +01:00 committed by Uwe Hermann
parent 9f5d4c3cc3
commit 264c99eda2
1 changed files with 2 additions and 2 deletions

View File

@ -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.");