From 53d44d49597a515ae6c22ec20138a21986f6c3ab Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 25 Feb 2011 12:48:26 +0100 Subject: 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. --- lib/include/radsec/radsec-impl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/include') 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 { -- cgit v1.1