[PATCH] ccache_regain_all_now() loops forever in v3-0- and
v3-2 [Was Re: [PATCH] clean the event context after fork in
fork_domain_child()]
Jeremy Allison
jra at samba.org
Sun Jan 11 04:01:21 GMT 2009
On Sun, Jan 11, 2009 at 11:21:48AM +0800, boyang wrote:
> Jeremy Allison wrote:
> > On Fri, Jan 09, 2009 at 03:07:18PM +0800, boyang wrote:
> >
> >> Jeremy Allison wrote:
> >>
> >>
> >>> Ok, I've finished doing a lot of cleanup work on the
> >>> event code in winbindd. It's all checked into 3.3 and
> >>> master. Please review.
> >>>
> >>> If you feel it's working, feel free to back-port to 3.2
> >>> and/or 3.0.x and I'll commit patches for you. I'm not
> >>> doing that work yet as I'm not sure if we're doing any
> >>> more 3.2.x releases or just moving on to 3.3.0.
> >>>
> >>>
> >> Hi, Jeremy && metze:
> >> I have ported the event context clean code and krb5 refresh chain
> >> code back to v3-0 and v3-2. There are two commit in each of the two
> >> attachments. One commit is for event context and another for krb5
> >> refresh chain. Please review it. Thanks!
> >>
> >
> > Pushed, thanks !
> >
> > Jeremy.
> >
> Hi, Jeremy:
> ccache_regain_all_now() loops forever. :-). Why cur = cur->next is
> missed from v3-0-test and v3-2-test? It's my fault to post too many
> versions of the patch. :-P . Please have a look at the tiny patch. Thanks!
I'm actually going to modify this function to be identical
to the code in 3.3 (other than the different function
prototypes of event_add_timed()) as we need consistency
in these implementations.
It now looks like :
void ccache_regain_all_now(void)
{
struct WINBINDD_CCACHE_ENTRY *cur;
struct timeval t = timeval_current();
for (cur = ccache_list; cur; cur = cur->next) {
struct timed_event *new_event;
/*
* if refresh_time is 0, we know that the
* the event has the krb5_ticket_gain_handler
*/
if (cur->refresh_time == 0) {
new_event = event_add_timed(winbind_event_context(),
cur, t,
"krb5_ticket_gain_handler",
krb5_ticket_gain_handler,
cur);
} else {
new_event = event_add_timed(winbind_event_context(),
cur, t,
"krb5_ticket_refresh_handler",
krb5_ticket_refresh_handler,
cur);
}
if (!new_event) {
continue;
}
TALLOC_FREE(cur->event);
cur->event = new_event;
}
return;
}
More information about the samba-technical
mailing list