2836 int i, index, max_size;
2837 static int curr_allocated_size = 0;
2838 static char *dns_info_buffer;
2839 register char *dns_client_info;
2844 if(!curr_allocated_size)
2846 dns_info_buffer =
malloc((
size_t)max_size);
2847 curr_allocated_size = max_size;
2849 dns_client_info = dns_info_buffer;
2850 dns_client_info[0] =
'\0';
2858 if(clip->
dnsp != dnsp)
2860 curr_conns[index++] = clip->
conn_id;
2863 if (max_size > curr_allocated_size)
2865 free(dns_info_buffer);
2866 dns_info_buffer =
malloc((
size_t)max_size);
2867 curr_allocated_size = max_size;
2869 dns_client_info = dns_info_buffer;
2870 dns_client_info[0] =
'\0';
2876 strcat(dns_client_info,
"+");
2881 strcat(dns_client_info,
"-");
2886 for(i=0; i<index;i++)
2889 strcat(dns_client_info,task);
2890 strcat(dns_client_info,
"@");
2891 strcat(dns_client_info,node);
2892 strcat(dns_client_info,
"|");
2895 dns_client_info[(int)strlen(dns_client_info)-1] =
'\0';
2896 *bufp = (
int *)dns_info_buffer;
2897 *
size = (int)strlen(dns_info_buffer)+1;
static CLIENT * Client_head
int dna_get_node_task(int conn_id, char *node, char *task)
DLL * dll_get_next(DLL *head, DLL *item)