summaryrefslogtreecommitdiff
path: root/lib/include/radsec
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2011-02-25 12:48:26 +0100
committerLinus Nordberg <linus@nordberg.se>2011-02-25 12:48:26 +0100
commit53d44d49597a515ae6c22ec20138a21986f6c3ab (patch)
tree0fc06bac6be003d2b936679075fdbf6eb735d1d7 /lib/include/radsec
parent0befcd00af0a034bc4ec4e3466d2b37b3c658cc9 (diff)
Get rid of loopbreak as a mean for signalling successful packet handling.
In blocking mode, breaking the event loop with loopbreak will probably be needed for exceptions like timeout so we shouldn't use it for breaking the loop and signalling success. In the user callbaks used in blocking mode (_rcb and _wcb), disable read and write events on the event buffer. This will stop the loop. Also, set a flag in the packet struct to signal success. In the "low level callbacks" (_read_cb and _write_cb), enable read or write, accordingly.
Diffstat (limited to 'lib/include/radsec')
-rw-r--r--lib/include/radsec/radsec-impl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h
index b5dafef..932e5d2 100644
--- a/lib/include/radsec/radsec-impl.h
+++ b/lib/include/radsec/radsec-impl.h
@@ -93,6 +93,8 @@ struct rs_packet {
uint8_t hdr[4];
RADIUS_PACKET *rpkt;
struct rs_packet *original;
+ char valid_flag;
+ char written_flag;
};
struct rs_attr {