X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/53c1823aaef2eb8d547a8eed8cfe12fe7204ca79..176e3f0281e4a64ba984a6034e50f9604e708d39:/projects/stargazer/plugins/other/radius/radius.cpp diff --git a/projects/stargazer/plugins/other/radius/radius.cpp b/projects/stargazer/plugins/other/radius/radius.cpp index 6a02ce4f..18c18816 100644 --- a/projects/stargazer/plugins/other/radius/radius.cpp +++ b/projects/stargazer/plugins/other/radius/radius.cpp @@ -239,25 +239,20 @@ if (isRunning) struct timespec ts = {0, 200000000}; nanosleep(&ts, NULL); } - - //after 5 seconds waiting thread still running. now killing it - if (isRunning) - { - if (pthread_kill(thread, SIGINT)) - { - errorStr = "Cannot kill thread."; - printfd(__FILE__, "Cannot kill thread\n"); - return -1; - } - printfd(__FILE__, "RADIUS::Stop killed Run\n"); - } } +if (isRunning) + return -1; + return 0; } //----------------------------------------------------------------------------- void * RADIUS::Run(void * d) { +sigset_t signalSet; +sigfillset(&signalSet); +pthread_sigmask(SIG_BLOCK, &signalSet, NULL); + RADIUS * rad = (RADIUS *)d; RAD_PACKET packet;