diff --git a/main/manager.c b/main/manager.c index 961ed5786..5edab2697 100644 --- a/main/manager.c +++ b/main/manager.c @@ -921,7 +921,6 @@ static const struct { * data. */ struct mansession_session { - pthread_t ms_t; /*!< Execution thread, basically useless */ /*! \todo XXX need to document which fields it is protecting */ struct sockaddr_in sin; /*!< address we are connecting from */ FILE *f; /*!< fdopen() on the underlying fd */ @@ -4681,19 +4680,6 @@ static void *session_do(void *data) } } - /* It is possible under certain circumstances for this session thread - to complete its work and exit *before* the thread that created it - has finished executing the ast_pthread_create_background() function. - If this occurs, some versions of glibc appear to act in a buggy - fashion and attempt to write data into memory that it thinks belongs - to the thread but is in fact not owned by the thread (or may have - been freed completely). - - Causing this thread to yield to other threads at least one time - appears to work around this bug. - */ - usleep(1); - session_destroy(session); ast_mutex_destroy(&s.lock);