2959 int max_size, done = 0;
2960 static int curr_allocated_size = 0;
2961 static char *service_info_buffer;
2968 if(!curr_allocated_size)
2970 service_info_buffer = (
char *)
malloc((
size_t)max_size);
2971 curr_allocated_size = max_size;
2973 else if (max_size > curr_allocated_size)
2975 free(service_info_buffer);
2976 service_info_buffer = (
char *)
malloc((
size_t)max_size);
2977 curr_allocated_size = max_size;
2979 service_info_buffer[0] =
'\0';
2980 buff_ptr = service_info_buffer;
2987 if(servp->
dnsp != dnsp)
2999 buff_ptr += (int)strlen(buff_ptr);
3007 if(servp->
dnsp != dnsp)
3014 strcat(buff_ptr,
"-");
3015 buff_ptr += (int)strlen(buff_ptr);
3017 buff_ptr += (int)strlen(buff_ptr);
3023 strcat(buff_ptr,
"+");
3024 buff_ptr += (int)strlen(buff_ptr);
3028 buff_ptr += (int)strlen(buff_ptr);
3036 *bufp = (
int *)service_info_buffer;
3037 *
size = (int)(buff_ptr - service_info_buffer+1);
SERVICE * dis_hash_service_get_next(int *curr_index, SERVICE *prevp, int new_entries)
int updating_service_list
void append_service(char *service_info_buffer, SERVICE *servp)
static int Last_n_clients