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;
}
//-----------------------------------------------------------------------------
return -1;
}
USER_IPS ips = ui->GetProperty().ips;
- if (users->Authorize(ui->GetLogin(), ips[0].ip, 0xffFFffFF, this))
+ if (!users->Authorize(ui->GetLogin(), ips[0].ip, 0xffFFffFF, this))
{
printfd(__FILE__, "RADIUS::ProcessAcctStartPacket cannot authorize user '%s'\n", packet->login);
packet->packetType = RAD_REJECT_PACKET;