2649 int max_size, done = 0;
2650 static int curr_allocated_size = 0;
2651 static char *service_info_buffer;
2658 if(!curr_allocated_size)
2660 service_info_buffer = (
char *)
malloc(max_size);
2661 curr_allocated_size = max_size;
2663 else if (max_size > curr_allocated_size)
2665 free(service_info_buffer);
2666 service_info_buffer = (
char *)
malloc(max_size);
2667 curr_allocated_size = max_size;
2669 service_info_buffer[0] =
'\0';
2670 buff_ptr = service_info_buffer;
2677 if(servp->
dnsp != dnsp)
2683 buff_ptr += strlen(buff_ptr);
2691 if(servp->
dnsp != dnsp)
2697 strcat(buff_ptr,
"+");
2698 buff_ptr += strlen(buff_ptr);
2702 buff_ptr += strlen(buff_ptr);
2707 strcat(buff_ptr,
"-");
2708 buff_ptr += strlen(buff_ptr);
2710 buff_ptr += strlen(buff_ptr);
2714 *bufp = (
int *)service_info_buffer;
2715 *
size = buff_ptr - service_info_buffer+1;
SERVICE * dis_hash_service_get_next(int *curr_index, SERVICE *prevp, int new_entries)
void append_service(char *service_info_buffer, SERVICE *servp)