mirror of
https://github.com/systemd/systemd
synced 2026-04-23 23:44:50 +02:00
Compare commits
2 Commits
6d39da79c8
...
f777e745a7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f777e745a7 | ||
|
|
8166950763 |
@ -12,15 +12,12 @@
|
|||||||
|
|
||||||
#define _FOREACH_INOTIFY_EVENT(e, buffer, sz, log_level, start, end) \
|
#define _FOREACH_INOTIFY_EVENT(e, buffer, sz, log_level, start, end) \
|
||||||
for (struct inotify_event \
|
for (struct inotify_event \
|
||||||
*start = &((buffer).ev), \
|
*start = &((buffer).ev), \
|
||||||
*end = (struct inotify_event*) ((uint8_t*) start + (sz)), \
|
*end = (struct inotify_event*) ((uint8_t*) start + (sz)), \
|
||||||
*e = start; \
|
*e = start; \
|
||||||
(uint8_t*) e + sizeof(struct inotify_event) <= (uint8_t*) end && \
|
(size_t) ((uint8_t*) end - (uint8_t*) e) >= sizeof(struct inotify_event) && \
|
||||||
(uint8_t*) e + sizeof(struct inotify_event) + e->len <= (uint8_t*) end ? true : \
|
((size_t) ((uint8_t*) end - (uint8_t*) e) >= sizeof(struct inotify_event) + e->len || \
|
||||||
({ \
|
(log_full(log_level, "Received invalid inotify event, ignoring."), false)); \
|
||||||
log_full(log_level, "Received invalid inotify event, ignoring."); \
|
|
||||||
false; \
|
|
||||||
}); \
|
|
||||||
e = (struct inotify_event*) ((uint8_t*) e + sizeof(struct inotify_event) + e->len))
|
e = (struct inotify_event*) ((uint8_t*) e + sizeof(struct inotify_event) + e->len))
|
||||||
|
|
||||||
#define _FOREACH_INOTIFY_EVENT_FULL(e, buffer, sz, log_level) \
|
#define _FOREACH_INOTIFY_EVENT_FULL(e, buffer, sz, log_level) \
|
||||||
|
|||||||
@ -210,8 +210,10 @@ DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(worker_hash_op, void, trivial_hash
|
|||||||
static void manager_clear_for_worker(Manager *manager) {
|
static void manager_clear_for_worker(Manager *manager) {
|
||||||
assert(manager);
|
assert(manager);
|
||||||
|
|
||||||
manager->inotify_event = sd_event_source_disable_unref(manager->inotify_event);
|
/* Do not use sd_event_source_disable_unref() here, as this is called by both workers and the
|
||||||
manager->kill_workers_event = sd_event_source_disable_unref(manager->kill_workers_event);
|
* main process. */
|
||||||
|
manager->inotify_event = sd_event_source_unref(manager->inotify_event);
|
||||||
|
manager->kill_workers_event = sd_event_source_unref(manager->kill_workers_event);
|
||||||
|
|
||||||
manager->event = sd_event_unref(manager->event);
|
manager->event = sd_event_unref(manager->event);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user