X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=authserver%2Fauthd%2Fauthd.php;h=520a39f8e0e14a52e4e9da484c4c5c6f1df0d810;hp=67b9627a86a174d5c4e8c670add94517e2530c7d;hb=c3c37cd9f486175adf0351de80c19efd02892ca6;hpb=684d7cc6c2ce6ba3f1ca5c48dda5c4efa9448455 diff --git a/authserver/authd/authd.php b/authserver/authd/authd.php index 67b9627..520a39f 100644 --- a/authserver/authd/authd.php +++ b/authserver/authd/authd.php @@ -30,6 +30,7 @@ if($pid == -1) { while(true) { msg_receive($sr_queue, 0, $msg_type, 16384, $msg); + echo "got message of type $msg_type\n"; switch($msg_type) { case MSG_GET_RADIUS_CLIENTS: $sql = "select * from radclients"; @@ -50,16 +51,20 @@ if($pid == -1) { // it should send us a client by rad_name - doesnt work yet $client = $msg["clientname"]; $sql = "delete from radclients where rad_name='$client'"; + $dbo = getDatabase(); $res = $dbo->query($sql); updateRadius(); msg_send($cl_queue, MSG_REMOVE_RADIUS_CLIENT, true); break; case MSG_ADD_RADIUS_CLIENT: + echo "in addradclient\n"; $client = $msg["clientname"]; $clientsecret = $msg["clientsecret"]; $clientip = $msg["clientip"]; $clientdesc = $msg["clientdescription"]; $sql = "insert into radclients values (NULL, '$client', '$clientip', '$clientsecret', '$clientdesc')"; + $dbo = getDatabase(); + $res = $dbo->query($sql); updateRadius(); msg_send($cl_queue, MSG_ADD_RADIUS_CLIENT, true); break;