]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/radius/radius.cpp
Introduced logger for plugins.
[stg.git] / projects / stargazer / plugins / other / radius / radius.cpp
index 18c1881670bc78827ec462b8b036930cac96a627..6fb4d2f94577cdfc8afc7b76d1314632e2664fc0 100644 (file)
@@ -136,7 +136,8 @@ RADIUS::RADIUS()
       thread(),
       mutex(),
       sock(-1),
-      packet()
+      packet(),
+      logger(GetPluginLogger(GetStgLogger(), "radius"))
 {
 InitEncrypt(&ctx, "");
 }
@@ -463,7 +464,7 @@ if (CanAcctService((char *)packet->service))
         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;