wangzhengquan
2020-12-29 ed1f486e2c2d8c02d675363d848a3460edfe80e3
test_net_socket/test_net_mod_socket.c
@@ -85,7 +85,7 @@
void *bus_handler(void *sockt) {
  pthread_detach(pthread_self());
  // pthread_detach(pthread_self());
  
  char action[512];
  while ( true) {
@@ -119,6 +119,10 @@
    printf("start bus failed\n");
    exit(1);
  }
  if (pthread_join(tid, NULL) != 0) {
    perror(" pthread_join");
  }
}
 
@@ -137,7 +141,6 @@
    sprintf(sendbuf, "RECEIVED  PORT %d NAME %s", remote_port, recvbuf);
    net_mod_socket_sendto(client, sendbuf, strlen(sendbuf) + 1, remote_port);
    free(recvbuf);
    sleep(1000);
  }
}
@@ -282,7 +285,7 @@
void test_net_sendandrecv_threads(char *nodelist) {
  int status, i = 0, processors = 4;
  int status, i = 0, processors = 1;
  void *res[processors];
  // Targ *targs = (Targ *)calloc(processors, sizeof(Targ));
  Targ targs[processors];