From: Alan T. DeKok Date: Thu, 21 Sep 2017 15:57:48 +0000 (-0400) Subject: note that we either write ALL of the data, or NONE of it X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f371d26eea45d66a3046c27cd6702737fc46ea0e;p=thirdparty%2Ffreeradius-server.git note that we either write ALL of the data, or NONE of it --- diff --git a/src/lib/io/network.c b/src/lib/io/network.c index 2842d2e1472..43d195f4a6b 100644 --- a/src/lib/io/network.c +++ b/src/lib/io/network.c @@ -896,9 +896,12 @@ static void fr_network_post_event(UNUSED fr_event_list_t *el, UNUSED struct time continue; } - if ((size_t) rcode < cd->m.data_size) { - // call write function again at some later date. - } + /* + * We MUST have written all of the data. It is + * up to the app_io->write() function to track + * any partially written data. + */ + rad_assert((size_t) rcode == cd->m.data_size); DEBUG3("Sending reply to socket %d", s->fd); fr_message_done(&cd->m);