Changeset 243 in flair-src


Ignore:
Timestamp:
May 24, 2018, 9:46:08 AM (4 years ago)
Author:
Sanahuja Guillaume
Message:

resolve some bugs when closing connection with gcs

Location:
trunk/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/FrameworkManager_impl.cpp

    r234 r243  
    189189  if (com != NULL) {
    190190    delete com;
     191    //avoid waiting on closing if connection is lost
     192    if(connection_lost) {
     193      bool blocking = false;
     194      if (UDT::setsockopt(com_sock, 0, UDT_SNDSYN, &blocking, sizeof(bool)) != 0)
     195        Err("UDT::setsockopt error (UDT_SNDSYN)\n");
     196    }
    191197    status = UDT::close(com_sock);
    192198    if (status != 0)
     
    194200
    195201    SleepMS(200); // a revoir, sinon UDT::cleanup bloque en RT
    196     UDT::cleanup();
     202   
     203    if(connection_lost) {
     204      //don't know why?
     205     Warn("Cleaning up UDT socket, this can take some time\n");
     206    }
     207    if (UDT::cleanup() != 0)
     208        Err("UDT::cleanup error\n");
    197209  }
    198210
  • trunk/lib/FlairCore/src/Thread_impl.cpp

    r213 r243  
    149149
    150150  caller->self->Run();
    151 
     151  Printf("Stopping thread %s\n", caller->self->ObjectName().c_str());
    152152  caller->PrintStats();
    153153}
     
    160160
    161161  caller->self->Run();
    162 
     162  Printf("Stopping thread %s\n", caller->self->ObjectName().c_str());
    163163  caller->PrintStats();
    164164
     
    316316
    317317void Thread_impl::PrintStats(void) {
    318   Printf("Stopping thread %s\n", self->ObjectName().c_str());
    319318#ifdef __XENO__
    320319  RT_TASK_INFO info;
  • trunk/lib/FlairCore/src/ui_com.cpp

    r234 r243  
    118118
    119119ui_com::~ui_com() {
    120 // printf("destruction ui_com\n");
     120//Printf("destruction ui_com\n");
    121121
    122122#ifdef __XENO__
     
    143143  send_buffer = NULL;
    144144
    145   // printf("destruction ui_com ok\n");
     145  //Printf("destruction ui_com ok\n");
    146146}
    147147
  • trunk/lib/FlairSensorActuator/src/HostEthController.cpp

    r238 r243  
    7373
    7474HostEthController::~HostEthController() {
     75  dataSender->SafeStop();
     76  dataSender->Join();
    7577  SafeStop();
    7678  Join();
Note: See TracChangeset for help on using the changeset viewer.