Dears,
When the plugin is in accountingonly=true mode, closing openvpn will cause a segmentation fault causing all sorts of accounting loss, and NULL end time for sessions ...
When it's in accounting only mode *context->getThread() would always return 0 causing a segmentation fault on the call pthread_join(*context->getThread(),NULL) in radiusplugin.cpp ...
So a simple dirty workaround was to the following :
radiusplugin.cpp:682
//wait for the thread to exit
if (*context->getThread()!=0){
pthread_join(*context->getThread(),NULL);
pthread_cond_destroy(context->getCondSend( ));
pthread_cond_destroy(context->getCondRecv( ));
pthread_mutex_destroy(context->getMutexSend());
pthread_mutex_destroy(context->getMutexRecv());
}
Just did the trick, and now openvpn closes cleanly, closing all accounting sessions....
--
Thanks and best regards,
Sameh M Shaker