Skip to content

Commit

Permalink
Issue 6478 - fix compilation warning related to deferred memberof del…
Browse files Browse the repository at this point in the history
…ay (#6479)

Trivial compilation warning fix.

Issue: #6478

Reviewed by: @tbordaz
  • Loading branch information
progier389 authored Jan 7, 2025
1 parent 7e98ab3 commit ba09249
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 25 deletions.
11 changes: 5 additions & 6 deletions ldap/servers/slapd/back-ldbm/ldbm_add.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,16 +1450,15 @@ ldbm_back_add(Slapi_PBlock *pb)
}
if (!result_sent) {
int deferred;
PRIntervalTime delay;

if (!is_internal) {
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
if (deferred) {
delay = PR_MillisecondsToInterval(100);
}
while (deferred) {
DS_Sleep(delay);
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
PRIntervalTime delay = PR_MillisecondsToInterval(100);
while (deferred) {
DS_Sleep(delay);
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
}
}
}
slapi_send_ldap_result(pb, ldap_result_code, ldap_result_matcheddn, ldap_result_message, 0, NULL);
Expand Down
11 changes: 5 additions & 6 deletions ldap/servers/slapd/back-ldbm/ldbm_delete.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,16 +1531,15 @@ int delete_tombstone_entry = 0; /* We must remove the given tombstone entry from
}
if (!result_sent) {
int deferred;
PRIntervalTime delay;

if (!is_internal) {
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
if (deferred) {
delay = PR_MillisecondsToInterval(100);
}
while (deferred) {
DS_Sleep(delay);
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
PRIntervalTime delay = PR_MillisecondsToInterval(100);
while (deferred) {
DS_Sleep(delay);
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
}
}
}
slapi_send_ldap_result(pb, ldap_result_code, NULL, ldap_result_message, 0, NULL);
Expand Down
11 changes: 5 additions & 6 deletions ldap/servers/slapd/back-ldbm/ldbm_modify.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,16 +1168,15 @@ ldbm_back_modify(Slapi_PBlock *pb)
if (!result_sent) {
/* result is already sent in find_entry. */
int deferred;
PRIntervalTime delay;

if (!is_internal) {
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
if (deferred) {
delay = PR_MillisecondsToInterval(100);
}
while (deferred) {
DS_Sleep(delay);
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
PRIntervalTime delay = PR_MillisecondsToInterval(100);
while (deferred) {
DS_Sleep(delay);
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
}
}
}
slapi_send_ldap_result(pb, ldap_result_code, NULL, ldap_result_message, 0, NULL);
Expand Down
12 changes: 5 additions & 7 deletions ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1510,17 +1510,15 @@ ldbm_back_modrdn(Slapi_PBlock *pb)
}
if (!result_sent) {
int deferred;
PRIntervalTime delay;

if (!is_internal) {
/* for direct operation, wait for members update */
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
if (deferred) {
delay = PR_MillisecondsToInterval(100);
}
while (deferred) {
DS_Sleep(delay);
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
PRIntervalTime delay = PR_MillisecondsToInterval(100);
while (deferred) {
DS_Sleep(delay);
slapi_pblock_get(pb, SLAPI_DEFERRED_MEMBEROF, &deferred);
}
}
}
slapi_send_ldap_result(pb, ldap_result_code, ldap_result_matcheddn,
Expand Down

0 comments on commit ba09249

Please sign in to comment.