1298 static int curr_allocated_size = 0;
1299 static char *info_buffer;
1300 static int *pid_buffer, pid_size;
1303 int i, max_size, max_pid_size;
1305 char server[
MAX_NAME], *info_buffer_ptr;
1321 max_pid_size = (int)
sizeof(
int) * n_server;
1322 if(!curr_allocated_size)
1324 info_buffer = (
char *)
malloc((
size_t)max_size);
1325 curr_allocated_size = max_size;
1326 pid_buffer = (
int *)
malloc((
size_t)max_pid_size);
1328 else if (max_size > curr_allocated_size)
1331 info_buffer = (
char *)
malloc((
size_t)max_size);
1332 curr_allocated_size = max_size;
1334 pid_buffer = (
int *)
malloc((
size_t)max_pid_size);
1336 info_buffer[0] =
'\0';
1339 info_buffer_ptr = info_buffer;
1378 strcpy(info_buffer_ptr, server);
1379 info_buffer_ptr += (int)strlen(server);
1380 pid_buffer[pid_index] = connp->
pid;
1389 strcat(info_buffer,
"+");
1391 strcat(info_buffer,
"!");
1393 strcat(info_buffer,
"-");
1395 strcat(info_buffer,
"@");
1397 strcat(info_buffer,
"|");
1398 pid_buffer[pid_index] = connp->
pid;
1401 info_buffer[(int)strlen(info_buffer) - 1] =
'\0';
1402 info_buffer_ptr = &info_buffer[(int)strlen(info_buffer)+1];
1404 for(i = 0; i < pid_index; i++)
1406 if(i != (pid_index -1))
1407 sprintf(server,
"%d|",pid_buffer[i]);
1409 sprintf(server,
"%d",pid_buffer[i]);
1410 strcpy(info_buffer_ptr, server);
1411 info_buffer_ptr += (int)strlen(server);
1412 pid_size += (int)strlen(server);
1414 *bufp = (
int *)info_buffer;
1415 *
size = (int)strlen(info_buffer)+1+pid_size+1;
char node_name[MAX_NODE_NAME]
DllExp DIM_NOSHARE int Curr_N_Conns
DllExp DIM_NOSHARE DNS_CONNECTION * Dns_conns
char long_task_name[MAX_NAME]
sprintf(name1,"NewService%d", i)