From f1ce524ed0a623ce131830f122fbce5abd39ec45 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: May 21 2019 20:01:12 +0000 Subject: sdap: update last_usn on reconnect If we are reconnecting to the same server it makes sense the keep the stored maximum USN values for the different object classes. But since the highest USN is already read from the rootDSE during the reconnect it make sense to keep this value to be able to update the maximum USN values even of no new object where found during the related searches. Reviewed-by: Pavel Březina --- diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c index e81aaf4..4a3670e 100644 --- a/src/providers/ldap/sdap.c +++ b/src/providers/ldap/sdap.c @@ -1460,8 +1460,9 @@ void sdap_steal_server_opts(struct sdap_id_ctx *id_ctx, } /* discard if same as previous so we do not reset max usn values - * unnecessarily */ + * unnecessarily, only update last_usn. */ if (strcmp(id_ctx->srv_opts->server_id, (*srv_opts)->server_id) == 0) { + id_ctx->srv_opts->last_usn = (*srv_opts)->last_usn; talloc_zfree(*srv_opts); return; }