diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-06 14:46:57 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-06 14:46:57 +0100 |
commit | 7636505962a348d9564e53922834dc6df1274653 (patch) | |
tree | 28a696ab93922db7a3ebb47093e6225040ebc1fe /lib/conn.c | |
parent | fda0bfd44f940688f85fe3a99a0c8cd91611452f (diff) |
UDP w/o bufferevents, part 1.
Sending, no retransmitting and no receiving.
Diffstat (limited to 'lib/conn.c')
-rw-r--r-- | lib/conn.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -8,6 +8,7 @@ #include <assert.h> #include <debug.h> #include <event2/event.h> +#include <event2/bufferevent.h> #include <radsec/radsec.h> #include <radsec/radsec-impl.h> @@ -126,25 +127,22 @@ rs_conn_destroy (struct rs_connection *conn) assert (conn); - if (conn->is_connected) - { - err = rs_conn_disconnect (conn); - if (err) - return err; - } - /* NOTE: conn->realm is owned by context. */ /* NOTE: conn->peers is owned by context. */ + if (conn->is_connected) + err = rs_conn_disconnect (conn); if (conn->tev) event_free (conn->tev); + if (conn->bev) + bufferevent_free (conn->bev); if (conn->evb) event_base_free (conn->evb); /* TODO: free tls_ctx */ /* TODO: free tls_ssl */ - return 0; + return err; } int |