Removed libcharon dependencies from generic RADIUS protocol support
authorMartin Willi <martin@revosec.ch>
Mon, 27 Feb 2012 13:49:22 +0000 (14:49 +0100)
committerMartin Willi <martin@revosec.ch>
Mon, 5 Mar 2012 17:06:15 +0000 (18:06 +0100)
src/libcharon/plugins/eap_radius/eap_radius.c
src/libcharon/plugins/eap_radius/eap_radius_accounting.c
src/libcharon/plugins/eap_radius/radius_client.c
src/libcharon/plugins/eap_radius/radius_message.c

index d62bcd7..f2b47e3 100644 (file)
@@ -188,6 +188,10 @@ METHOD(eap_method_t, initiate, status_t,
                }
                response->destroy(response);
        }
+       else
+       {
+               charon->bus->alert(charon->bus, ALERT_RADIUS_NOT_RESPONDING);
+       }
        request->destroy(request);
        return status;
 }
index cd81cfc..25013f6 100644 (file)
@@ -134,6 +134,10 @@ static bool send_message(private_eap_radius_accounting_t *this,
                        ack = response->get_code(response) == RMC_ACCOUNTING_RESPONSE;
                        response->destroy(response);
                }
+               else
+               {
+                       charon->bus->alert(charon->bus, ALERT_RADIUS_NOT_RESPONDING);
+               }
                client->destroy(client);
        }
        return ack;
index 245308e..1a67096 100644 (file)
@@ -21,7 +21,7 @@
 #include <unistd.h>
 #include <errno.h>
 
-#include <daemon.h>
+#include <debug.h>
 #include <utils/host.h>
 #include <utils/linked_list.h>
 #include <threading/condvar.h>
@@ -116,7 +116,6 @@ METHOD(radius_client_t, request, radius_message_t*,
                return res;
        }
        this->server->put_socket(this->server, socket, FALSE);
-       charon->bus->alert(charon->bus, ALERT_RADIUS_NOT_RESPONDING);
        return NULL;
 }
 
index 9d7bf3e..ad88754 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "radius_message.h"
 
-#include <daemon.h>
+#include <debug.h>
 #include <crypto/hashers/hasher.h>
 
 typedef struct private_radius_message_t private_radius_message_t;