Skip to content

Commit

Permalink
[systemd login] Fix IO condition flag checks. JB#51399
Browse files Browse the repository at this point in the history
Use & when checking IO condition flags.
  • Loading branch information
LaakkonenJussi committed Oct 6, 2020
1 parent d2fc016 commit 9776fc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connman/src/systemd_login.c
Expand Up @@ -826,15 +826,15 @@ static gboolean io_channel_cb(GIOChannel *source, GIOCondition condition,
return -EINVAL;
}

if (condition && G_IO_IN) {
if (condition & G_IO_IN) {
err = init_delayed_status_check(login_data);
if (err && err != -EINPROGRESS)
DBG("failed to check session status");

if (sd_login_monitor_flush(login_data->login_monitor) < 0)
connman_warn("failed to flush systemd login monitor");

} else if (condition && G_IO_ERR) {
} else if (condition & G_IO_ERR) {
DBG("iochannel error, closing");

/* Clean the id to avoid double removal before closing */
Expand Down

0 comments on commit 9776fc8

Please sign in to comment.