wrepl_scavenging: add a comment to make the is_static case more clear
authorStefan Metzmacher <metze@sernet.de>
Tue, 25 Mar 2008 15:44:46 +0000 (16:44 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 19 Jan 2009 06:05:51 +0000 (07:05 +0100)
metze
(from samba4wins tree 67fa7dc4fe36b143d36df1309840328a14683e31)

source4/wrepl_server/wrepl_scavenging.c

index d4301e41c701010b61168fab9ba2a98238c667dc..a1edd9e8ce3d184cfd31497396e3287b577e5170 100644 (file)
@@ -99,12 +99,20 @@ static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *servi
                switch (rec->state) {
                case WREPL_STATE_ACTIVE:
                        old_state       = "active";
-                       new_state       = "active";
-                       if (!rec->is_static) {
-                               new_state       = "released";
-                               rec->state      = WREPL_STATE_RELEASED;
-                               rec->expire_time= service->config.tombstone_interval + now;
+                       if (rec->is_static) {
+                               /*
+                                *we store it again, so that it won't appear
+                                * in the scavenging the next time
+                                */
+                               old_state       = "active(static)";
+                               new_state       = "active(static)";
+                               modify_flags    = 0;
+                               modify_record   = true;
+                               break;
                        }
+                       new_state       = "released";
+                       rec->state      = WREPL_STATE_RELEASED;
+                       rec->expire_time= service->config.tombstone_interval + now;
                        modify_flags    = 0;
                        modify_record   = true;
                        break;