core: update line info after requesting the event handle
authorBartosz Golaszewski <bartekgola@gmail.com>
Fri, 20 Oct 2017 09:15:26 +0000 (11:15 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Fri, 20 Oct 2017 09:15:26 +0000 (11:15 +0200)
Just as we do when requesting the regular line handle - update line
info to reflect the changes after the event request.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/lib/core.c

index 80e04bfc72ca3c9b59c5da82c76b885ed802920d..7e950d22e7d09874c440daa9799dbc948f9bc1d0 100644 (file)
@@ -415,6 +415,7 @@ static int line_request_event_single(struct gpiod_line *line,
 
        line->state = LINE_REQUESTED_EVENTS;
        line->fd = req.fd;
+       line_maybe_update(line);
 
        return 0;
 }