X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fteleinfo%2Fprotocol.c;h=96ca0200312fd12a46ecf6b618dd99241fd0fd5a;hb=c1aae90038456a61d0f9313d34e6107c3440d3e7;hp=a610173d1aaaa20421d2716bf44b3e7eaf8f42cd;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/teleinfo/protocol.c b/src/hardware/teleinfo/protocol.c index a610173d..96ca0200 100644 --- a/src/hardware/teleinfo/protocol.c +++ b/src/hardware/teleinfo/protocol.c @@ -81,9 +81,8 @@ static void teleinfo_send_value(struct sr_dev_inst *sdi, const char *channel_nam g_slist_free(analog.channels); } -static void teleinfo_handle_mesurement(struct sr_dev_inst *sdi, - const char *label, const char *data, - char *optarif) +static void teleinfo_handle_measurement(struct sr_dev_inst *sdi, + const char *label, const char *data, char *optarif) { struct dev_context *devc; int v = atoi(data); @@ -135,7 +134,7 @@ static gboolean teleinfo_parse_group(struct sr_dev_inst *sdi, return FALSE; if (!teleinfo_control_check(label, data, control)) return FALSE; - teleinfo_handle_mesurement(sdi, label, data, optarif); + teleinfo_handle_measurement(sdi, label, data, optarif); return TRUE; } @@ -196,7 +195,7 @@ SR_PRIV int teleinfo_receive_data(int fd, int revents, void *cb_data) /* Try to get as much data as the buffer can hold. */ len = TELEINFO_BUF_SIZE - devc->buf_len; - len = serial_read(serial, devc->buf + devc->buf_len, len); + len = serial_read_nonblocking(serial, devc->buf + devc->buf_len, len); if (len < 1) { sr_err("Serial port read error: %d.", len); return FALSE;