diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-09 10:16:27 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-09 10:16:27 +0100 |
commit | c4e2bd206bb9248843a8a4d9a945c5e49a188474 (patch) | |
tree | c18950810e67978078d188d8cc7f444efa975116 /lib | |
parent | fac0219dad91c574417f78ec674aa0dd10949e15 (diff) |
Add RSE_DISCO.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/err.c | 1 | ||||
-rw-r--r-- | lib/include/radsec/radsec.h | 1 | ||||
-rw-r--r-- | lib/tcp.c | 1 |
3 files changed, 3 insertions, 0 deletions
@@ -32,6 +32,7 @@ static const char *_errtxt[] = { "invalid argument", /* 17 RSE_INVAL */ "I/O timeout", /* 18 RSE_TIMEOUT_IO */ "timeout", /* 19 RSE_TIMEOUT */ + "peer disconnected", /* 20 RSE_DISCO */ }; #define ERRTXT_SIZE (sizeof(_errtxt) / sizeof(*_errtxt)) diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h index f620fed..971fc17 100644 --- a/lib/include/radsec/radsec.h +++ b/lib/include/radsec/radsec.h @@ -26,6 +26,7 @@ enum rs_error_code { RSE_INVAL = 17, /* Invalid argument. */ RSE_TIMEOUT_IO = 18, /* I/O timeout. */ RSE_TIMEOUT = 19, /* High level timeout. */ + RSE_DISCO = 20, }; enum rs_conn_type { @@ -209,6 +209,7 @@ tcp_event_cb (struct bufferevent *bev, short events, void *user_data) if (sockerr == 0) /* FIXME: True that errno == 0 means closed? */ { event_on_disconnect (conn); + rs_err_conn_push_fl (pkt->conn, RSE_DISCO, __FILE__, __LINE__, NULL); } else { |