From 96bc4042779570e6239b2626888ea0ca9be17391 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Tue, 9 Jun 1998 01:56:18 +0000 Subject: This is a first step toward moving long namelists into a database. I split the name_record structure into pieces. The goal is that the key (the name) be separate from the data associated with the key. Databases such as gdbm store information in [key,content] pairs. There is no functional change in with this update. It's just a step in the direction that Jeremy and I have been discussing. Chris -)----- (This used to be commit e420a4bd7d368a0e910893400fb7b46ab8694a08) --- source3/nmbd/nmbd_mynames.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'source3/nmbd/nmbd_mynames.c') diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c index 2bb8f775d0..f0330c00b7 100644 --- a/source3/nmbd/nmbd_mynames.c +++ b/source3/nmbd/nmbd_mynames.c @@ -158,7 +158,8 @@ void release_my_names(void) for (namerec = subrec->namelist; namerec; namerec = nextnamerec) { nextnamerec = namerec->next; - if ((namerec->source == SELF_NAME) && !NAME_IS_DEREGISTERING(namerec)) + if( (namerec->data.source == SELF_NAME) + && !NAME_IS_DEREGISTERING(namerec) ) release_name(subrec, namerec, standard_success_release, NULL, NULL); } @@ -180,18 +181,19 @@ void refresh_my_names(time_t t) for (namerec = subrec->namelist; namerec; namerec = namerec->next) { /* Each SELF name has an individual time to be refreshed. */ - if ((namerec->source == SELF_NAME) && (namerec->refresh_time < t) && - (namerec->death_time != PERMANENT_TTL)) + if( (namerec->data.source == SELF_NAME) + && (namerec->data.refresh_time < t) + && ( namerec->data.death_time != PERMANENT_TTL) ) { /* We cheat here and pretend the refresh is going to be successful & update the refresh times. This stops multiple refresh calls being done. We actually deal with refresh failure in the fail_fn. */ - if(!is_refresh_already_queued( subrec, namerec)) - refresh_name(subrec, namerec, NULL, NULL, NULL); - namerec->death_time += lp_max_ttl(); - namerec->refresh_time += lp_max_ttl(); + if( !is_refresh_already_queued( subrec, namerec) ) + refresh_name( subrec, namerec, NULL, NULL, NULL ); + namerec->data.death_time += lp_max_ttl(); + namerec->data.refresh_time += lp_max_ttl(); } } } -- cgit