From: Alan T. DeKok Date: Tue, 26 Sep 2017 19:15:57 +0000 (-0400) Subject: add default_reply_size X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f253732b0e535e85a2d7ff60b5976a9feb297703;p=thirdparty%2Ffreeradius-server.git add default_reply_size for things like the detail file reader, which don't really send replies --- diff --git a/src/lib/io/application.h b/src/lib/io/application.h index 40c7c2439b3..f1472b640b2 100644 --- a/src/lib/io/application.h +++ b/src/lib/io/application.h @@ -96,7 +96,8 @@ typedef struct fr_app_io_t { fr_app_event_list_set_t event_list_set; //!< Called by the network thread to pass an event list //!< for use by the app_io_t. - size_t default_message_size; //!< Usually minimum message size + size_t default_message_size; //!< Usually maximum message size + size_t default_reply_size; //!< same for replies bool track_duplicates; //!< track duplicate packets fr_io_open_t open; //!< Open a new socket for listening, or accept/connect a new diff --git a/src/lib/io/worker.c b/src/lib/io/worker.c index 25434de44a8..2b489658931 100644 --- a/src/lib/io/worker.c +++ b/src/lib/io/worker.c @@ -1002,7 +1002,8 @@ static void fr_worker_run_request(fr_worker_t *worker, REQUEST *request) return; case FR_IO_REPLY: - size = request->async->listen->app_io->default_message_size; + size = request->async->listen->app_io->default_reply_size; + if (!size) size = request->async->listen->app_io->default_message_size; break; } diff --git a/src/modules/proto_detail/proto_detail_file.c b/src/modules/proto_detail/proto_detail_file.c index c2255903277..46e498fe388 100644 --- a/src/modules/proto_detail/proto_detail_file.c +++ b/src/modules/proto_detail/proto_detail_file.c @@ -443,6 +443,7 @@ fr_app_io_t proto_detail_file = { .instantiate = mod_instantiate, .default_message_size = 65536, + .default_reply_size = 32, .open = mod_open, .read = mod_read,