mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
sd-rtnl: message - don't put NULL message on rqueue
If nothing interesting was receieved we should not put anything on the queue.
This commit is contained in:
parent
6fc518838c
commit
24a026737d
@ -1194,12 +1194,17 @@ int socket_read_message(sd_rtnl *rtnl) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = rtnl_rqueue_make_room(rtnl);
|
if (first) {
|
||||||
if (r < 0)
|
r = rtnl_rqueue_make_room(rtnl);
|
||||||
return r;
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
rtnl->rqueue[rtnl->rqueue_size ++] = first;
|
rtnl->rqueue[rtnl->rqueue_size ++] = first;
|
||||||
first = NULL;
|
first = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len)
|
||||||
|
log_debug("sd-rtnl: discarding %zu bytes of incoming message", len);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user