FACT++  1.0
SERVICE* dis_hash_service_get_next ( int *  curr_index,
SERVICE prevp,
int  new_entries 
)

Definition at line 2920 of file dis_old.c.

References dll_get_next(), and MAX_HASH_ENTRIES.

Referenced by dis_hash_print(), dis_stop_serving(), do_dis_add_service(), do_dis_stop_serving_dns(), register_services(), and service_info().

2921 {
2922  int index;
2923  SERVICE *servp = 0;
2924 /*
2925  if(!prevp)
2926  {
2927  index = -1;
2928  }
2929 */
2930  index = *curr_index;
2931  if(index == -1)
2932  {
2933  index++;
2934  prevp = Service_hash_table[index];
2935  }
2936  if(!prevp)
2937  {
2938  prevp = Service_hash_table[index];
2939  }
2940  do
2941  {
2942  if((!new_entries) || (Service_new_entries[index] > 0))
2943  {
2944  servp = (SERVICE *) dll_get_next(
2945  (DLL *) Service_hash_table[index],
2946  (DLL *) prevp);
2947  if(servp)
2948  break;
2949  }
2950  index++;
2951  if(index == MAX_HASH_ENTRIES)
2952  {
2953  *curr_index = -1;
2954  return((SERVICE *) 0);
2955  }
2956  prevp = Service_hash_table[index];
2957  } while(!servp);
2958  *curr_index = index;
2959  return(servp);
2960 }
static int Service_new_entries[MAX_HASH_ENTRIES]
Definition: dis_old.c:2859
#define MAX_HASH_ENTRIES
Definition: dis_old.c:2856
static SERVICE * Service_hash_table[MAX_HASH_ENTRIES]
Definition: dis_old.c:2858
Definition: dim.h:530
Definition: dis.c:69
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function: