Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
a1308f8d
Commit
a1308f8d
authored
Jun 21, 2004
by
Jong Hyuk Choi
Browse files
syncrepl retry code fix for correct timing
parent
b24e5407
Changes
4
Hide whitespace changes
Inline
Side-by-side
libraries/libldap_r/rq.c
View file @
a1308f8d
...
...
@@ -66,9 +66,9 @@ ldap_pvt_runqueue_remove(
break
;
}
if
(
e
==
entry
)
{
LDAP_STAILQ_REMOVE
(
&
rq
->
task_list
,
entry
,
re_s
,
tnext
);
}
assert
(
e
==
entry
)
;
LDAP_STAILQ_REMOVE
(
&
rq
->
task_list
,
entry
,
re_s
,
tnext
);
LDAP_FREE
(
entry
);
}
...
...
servers/slapd/daemon.c
View file @
a1308f8d
...
...
@@ -2147,3 +2147,8 @@ void slapd_add_internal(ber_socket_t s, int isactive) {
Listener
**
slapd_get_listeners
(
void
)
{
return
slap_listeners
;
}
void
slap_wake_listener
()
{
WAKE_LISTENER
(
1
);
}
servers/slapd/proto-slap.h
View file @
a1308f8d
...
...
@@ -422,6 +422,7 @@ LDAP_SLAPD_F (void) slapd_remove LDAP_P((ber_socket_t s, int wasactive, int wake
LDAP_SLAPD_F
(
RETSIGTYPE
)
slap_sig_shutdown
LDAP_P
((
int
sig
));
LDAP_SLAPD_F
(
RETSIGTYPE
)
slap_sig_wake
LDAP_P
((
int
sig
));
LDAP_SLAPD_F
(
void
)
slap_wake_listener
LDAP_P
((
void
));
LDAP_SLAPD_F
(
void
)
slapd_set_write
LDAP_P
((
ber_socket_t
s
,
int
wake
));
LDAP_SLAPD_F
(
void
)
slapd_clr_write
LDAP_P
((
ber_socket_t
s
,
int
wake
));
...
...
servers/slapd/syncrepl.c
View file @
a1308f8d
...
...
@@ -907,10 +907,11 @@ do_syncrepl(
ldap_pvt_runqueue_stoptask
(
&
syncrepl_rq
,
rtask
);
}
if
(
dostop
)
{
connection_client_stop
(
s
);
}
if
(
rc
==
LDAP_SUCCESS
)
{
if
(
dostop
)
{
connection_client_stop
(
s
);
}
if
(
si
->
si_type
==
LDAP_SYNC_REFRESH_ONLY
)
{
defer
=
0
;
}
...
...
@@ -929,15 +930,13 @@ do_syncrepl(
}
if
(
!
si
->
si_retrynum
||
si
->
si_retrynum
[
i
]
==
-
2
)
{
if
(
dostop
)
{
connection_client_stop
(
s
);
}
ldap_pvt_runqueue_remove
(
&
syncrepl_rq
,
rtask
);
}
else
if
(
si
->
si_retrynum
[
i
]
>=
-
1
)
{
if
(
si
->
si_retrynum
[
i
]
>
0
)
si
->
si_retrynum
[
i
]
--
;
rtask
->
interval
.
tv_sec
=
si
->
si_retryinterval
[
i
];
ldap_pvt_runqueue_resched
(
&
syncrepl_rq
,
rtask
,
0
);
slap_wake_listener
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment