Permalink
Browse files

Remove unneeded `==true'

1 parent 0004419 commit 0e9768aca349e6fe8a05368021c967fcf2bf5e0e @squadette committed May 4, 2009
Showing with 7 additions and 7 deletions.
  1. +1 −1 RadiusClass/main.cpp
  2. +1 −1 UserAcct.cpp
  3. +1 −1 UserAuth.cpp
  4. +4 −4 radiusplugin.cpp
View
@@ -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
@@ -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
@@ -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
@@ -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!

0 comments on commit 0e9768a

Please sign in to comment.