Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove unneeded `==true'

  • Loading branch information...
commit 0e9768aca349e6fe8a05368021c967fcf2bf5e0e 1 parent 0004419
@squadette authored
View
2  RadiusClass/main.cpp
@@ -270,7 +270,7 @@ int main_test (void)
//check if there are servers
try
{
- if(serverlist->empty()==true)
+ if(serverlist->empty())
{
throw(string("RADIUS-CLASS: No servers defined!"));
}
View
2  UserAcct.cpp
@@ -995,7 +995,7 @@ int UserAcct::deleteCcdFile(PluginContext * context)
{
string filename;
filename = context->conf.getCcdPath()+ this->getCommonname();
- if(context->conf.getOverWriteCCFiles()==true)
+ if(context->conf.getOverWriteCCFiles())
{
remove(filename.c_str());
}
View
2  UserAuth.cpp
@@ -1473,7 +1473,7 @@ int UserAuth::createCcdFile(PluginContext *context)
int len=0;
- if(context->conf.getOverWriteCCFiles()==true)
+ if(context->conf.getOverWriteCCFiles())
{
memset(ipstring,0,100);
memset(framedip,0,16);
View
8 radiusplugin.cpp
@@ -341,7 +341,7 @@ extern "C"
//restore the context which was created at the function openvpn_plugin_open_v1
PluginContext *context = ( struct PluginContext * ) handle;
- if(context->getStartThread()==true)
+ if(context->getStartThread())
{
pthread_cond_init (context->getCondSend(), NULL);
pthread_mutex_init (context->getMutexSend(), NULL);
@@ -554,7 +554,7 @@ extern "C"
cerr << getTime() << "RADIUS-PLUGIN: FOREGROUND: Set FramedIP to the IP (" << newuser->getFramedIp() << ") OpenVPN assigned to the user " << newuser->getUsername() << "\n";
//the user must be there and must be authenticated but not accounted
// isAccounted and isAuthenticated is true it is client connect for renegotiation, the user is already in the accounting process
- if ( newuser!=NULL && newuser->isAccounted() ==false && newuser->isAuthenticated() ==true )
+ if ( newuser!=NULL && newuser->isAccounted() ==false && newuser->isAuthenticated() )
{
//transform the integers to strings to send them over the socket
@@ -1063,7 +1063,7 @@ void * auth_user_pass_verify(void * c)
//save the success
newuser->setAuthenticated ( true );
}
- else if ( newuser->isAuthenticated() ==true && olduser!=NULL )
+ else if ( newuser->isAuthenticated() && olduser!=NULL )
{
cerr << getTime() << "RADIUS-PLUGIN: FOREGROUND THREAD: Don't add the user to the map, it is a rekeying.\n";
}
@@ -1083,7 +1083,7 @@ void * auth_user_pass_verify(void * c)
}
else //AUTH failed
{
- if ( newuser->isAccounted()==true) //user is already known, delete him from the accounting
+ if ( newuser->isAccounted() ) //user is already known, delete him from the accounting
{
cerr << getTime() << "RADIUS-PLUGIN: FOREGROUND THREAD: Error ar rekeying!\n";
//error on authenticate user at rekeying -> delete the user!
Please sign in to comment.
Something went wrong with that request. Please try again.