diff --git a/src/box/wal.c b/src/box/wal.c index d231cc98d220034b927c93c16fa52a2306f0093d..b239acd48ca70ce2ec5ba1259ec2556d46a8e55b 100644 --- a/src/box/wal.c +++ b/src/box/wal.c @@ -1033,7 +1033,7 @@ wal_watcher_notify(struct wal_watcher *watcher, unsigned events) * mark the watcher to resend it as soon as it * returns to WAL so as not to lose any events. */ - watcher->events |= events; + watcher->pending_events |= events; return; } @@ -1062,13 +1062,13 @@ wal_watcher_notify_complete(struct cmsg *cmsg) return; } - if (watcher->events != 0) { + if (watcher->pending_events != 0) { /* * Resend the message if we got notified while * it was en route, see wal_watcher_notify(). */ - wal_watcher_notify(watcher, watcher->events); - watcher->events = 0; + wal_watcher_notify(watcher, watcher->pending_events); + watcher->pending_events = 0; } } @@ -1109,7 +1109,7 @@ wal_set_watcher(struct wal_watcher *watcher, const char *name, watcher->msg.watcher = watcher; watcher->msg.events = 0; watcher->msg.cmsg.route = NULL; - watcher->events = 0; + watcher->pending_events = 0; assert(lengthof(watcher->route) == 2); watcher->route[0] = (struct cmsg_hop) diff --git a/src/box/wal.h b/src/box/wal.h index 7371ce933b8b625e57f595712cec89a98111c4ea..b7edcd43f1e82d444299d2ef3429b28ad369926f 100644 --- a/src/box/wal.h +++ b/src/box/wal.h @@ -101,7 +101,7 @@ struct wal_watcher { * It indicates that the message must be resend * right upon returning to WAL. */ - unsigned events; + unsigned pending_events; }; /**