This didn't actually matter, since it was only used to check if importing
should update an existing user. However, importing is only run at startup
when all users have last_update=0 anyway.
The following changes bring new use cases for last_update.
struct replicator_user *user,
enum replication_priority priority)
{
- if (user->priority > priority) {
- /* user already has a higher priority than this */
+ if (user->priority >= priority) {
+ /* user already has at least this high priority */
return;
}
user->priority = priority;
must be called to add/move the user to the proper place in the queue. */
struct replicator_user *
replicator_queue_get(struct replicator_queue *queue, const char *username);
-/* Update user's priority, if it isn't already higher. */
+/* Update user's priority if it's currently lower. */
void replicator_queue_update(struct replicator_queue *queue,
struct replicator_user *user,
enum replication_priority priority);