2526 int i, index, max_size;
2527 static int curr_allocated_size = 0;
2528 static char *dns_info_buffer;
2529 register char *dns_client_info;
2534 if(!curr_allocated_size)
2536 dns_info_buffer =
malloc(max_size);
2537 curr_allocated_size = max_size;
2539 dns_client_info = dns_info_buffer;
2540 dns_client_info[0] =
'\0';
2548 if(clip->
dnsp != dnsp)
2550 curr_conns[index++] = clip->
conn_id;
2553 if (max_size > curr_allocated_size)
2555 free(dns_info_buffer);
2556 dns_info_buffer =
malloc(max_size);
2557 curr_allocated_size = max_size;
2559 dns_client_info = dns_info_buffer;
2560 dns_client_info[0] =
'\0';
2566 strcat(dns_client_info,
"+");
2571 strcat(dns_client_info,
"-");
2576 for(i=0; i<index;i++)
2579 strcat(dns_client_info,task);
2580 strcat(dns_client_info,
"@");
2581 strcat(dns_client_info,node);
2582 strcat(dns_client_info,
"|");
2585 dns_client_info[strlen(dns_client_info)-1] =
'\0';
2586 *bufp = (
int *)dns_info_buffer;
2587 *
size = 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)