olsrd.git
4 years agoinfo: simplify determine_action
Ferry Huberts [Thu, 3 Dec 2015 11:43:05 +0000 (12:43 +0100)]
info: simplify determine_action

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: simplify use of the functions table further
Ferry Huberts [Thu, 3 Dec 2015 11:32:20 +0000 (12:32 +0100)]
info: simplify use of the functions table further

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: simplify setup of the functions table
Ferry Huberts [Thu, 3 Dec 2015 10:51:26 +0000 (11:51 +0100)]
jsoninfo: simplify setup of the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: simplify setup of the functions table
Ferry Huberts [Thu, 3 Dec 2015 10:51:16 +0000 (11:51 +0100)]
txtinfo: simplify setup of the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: simplify use of the functions table
Ferry Huberts [Thu, 3 Dec 2015 10:55:47 +0000 (11:55 +0100)]
info: simplify use of the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: minor reordering in send_info to reflect SIW_x order
Ferry Huberts [Thu, 3 Dec 2015 09:18:09 +0000 (10:18 +0100)]
info: minor reordering in send_info to reflect SIW_x order

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: define the uuidfile extern in the proper place
Ferry Huberts [Wed, 2 Dec 2015 17:48:41 +0000 (18:48 +0100)]
jsoninfo: define the uuidfile extern in the proper place

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: define the vtime extern in the proper place
Ferry Huberts [Wed, 2 Dec 2015 17:50:57 +0000 (18:50 +0100)]
txtinfo: define the vtime extern in the proper place

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: use sizeof() for uuid size
Ferry Huberts [Wed, 2 Dec 2015 15:49:28 +0000 (16:49 +0100)]
jsoninfo: helpers: use sizeof() for uuid size

And make its size a bit less strange.
Plus an extra minor simplification.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: use a double as parameter for abuf_json_float
Ferry Huberts [Wed, 2 Dec 2015 15:40:23 +0000 (16:40 +0100)]
jsoninfo: helpers: use a double as parameter for abuf_json_float

Higher precision

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: use sizeof() for buffers
Ferry Huberts [Wed, 2 Dec 2015 15:31:47 +0000 (16:31 +0100)]
jsoninfo: helpers: use sizeof() for buffers

Plus an extra 'ensure 0 termination'

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: get_string_from_file ensures '\0' in the first byte
Ferry Huberts [Wed, 2 Dec 2015 15:31:12 +0000 (16:31 +0100)]
jsoninfo: helpers: get_string_from_file ensures '\0' in the first byte

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: use an actual bool as parameter for abuf_json_boolean
Ferry Huberts [Wed, 2 Dec 2015 15:19:26 +0000 (16:19 +0100)]
jsoninfo: helpers: use an actual bool as parameter for abuf_json_boolean

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: fix output format for int/long
Ferry Huberts [Wed, 2 Dec 2015 15:18:56 +0000 (16:18 +0100)]
jsoninfo: helpers: fix output format for int/long

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: output floats in full precision
Ferry Huberts [Wed, 2 Dec 2015 16:59:06 +0000 (17:59 +0100)]
jsoninfo: helpers: output floats in full precision

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: use abuf_json_insert_comma
Ferry Huberts [Wed, 2 Dec 2015 15:14:21 +0000 (16:14 +0100)]
jsoninfo: helpers: use abuf_json_insert_comma

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: firm up asserts on currentjsondepth
Ferry Huberts [Wed, 2 Dec 2015 15:08:29 +0000 (16:08 +0100)]
jsoninfo: helpers: firm up asserts on currentjsondepth

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: minor simplification of abuf_json_new_indent
Ferry Huberts [Wed, 2 Dec 2015 15:06:11 +0000 (16:06 +0100)]
jsoninfo: helpers: minor simplification of abuf_json_new_indent

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use the function to initialise the config
Ferry Huberts [Wed, 2 Dec 2015 14:49:05 +0000 (15:49 +0100)]
jsoninfo: use the function to initialise the config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: use the function to initialise the config
Ferry Huberts [Wed, 2 Dec 2015 14:48:59 +0000 (15:48 +0100)]
txtinfo: use the function to initialise the config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: add a function to initialise the config
Ferry Huberts [Wed, 2 Dec 2015 14:48:43 +0000 (15:48 +0100)]
info: add a function to initialise the config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: remove some unused includes
Ferry Huberts [Wed, 2 Dec 2015 14:53:38 +0000 (15:53 +0100)]
jsoninfo: remove some unused includes

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: remove some unused includes
Ferry Huberts [Wed, 2 Dec 2015 14:25:46 +0000 (15:25 +0100)]
txtinfo: remove some unused includes

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: rename header files recursive include guards
Ferry Huberts [Wed, 2 Dec 2015 14:11:40 +0000 (15:11 +0100)]
jsoninfo: rename header files recursive include guards

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: rename header files recursive include guards
Ferry Huberts [Wed, 2 Dec 2015 14:11:28 +0000 (15:11 +0100)]
txtinfo: rename header files recursive include guards

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: check against the correct __linux__ define
Ferry Huberts [Wed, 2 Dec 2015 14:29:40 +0000 (15:29 +0100)]
info: check against the correct __linux__ define

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: http headers: add some asserts
Ferry Huberts [Wed, 2 Dec 2015 13:51:01 +0000 (14:51 +0100)]
info: http headers: add some asserts

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: plugin_ipc_init: merge 2 if statements
Ferry Huberts [Wed, 2 Dec 2015 13:47:17 +0000 (14:47 +0100)]
info: plugin_ipc_init: merge 2 if statements

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: plugin_ipc_init: fix a perror message
Ferry Huberts [Wed, 2 Dec 2015 13:41:25 +0000 (14:41 +0100)]
info: plugin_ipc_init: fix a perror message

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: plugin_ipc_init: close the ipc_socket on the error paths
Ferry Huberts [Wed, 2 Dec 2015 13:41:10 +0000 (14:41 +0100)]
info: plugin_ipc_init: close the ipc_socket on the error paths

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: plugin_ipc_init: 'unelse' an else branch, the if already returns
Ferry Huberts [Wed, 2 Dec 2015 13:34:57 +0000 (14:34 +0100)]
info: plugin_ipc_init: 'unelse' an else branch, the if already returns

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: plugin_ipc_init: rename 2 variables
Ferry Huberts [Wed, 2 Dec 2015 13:15:08 +0000 (14:15 +0100)]
info: plugin_ipc_init: rename 2 variables

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: minor fix
Ferry Huberts [Wed, 2 Dec 2015 13:12:33 +0000 (14:12 +0100)]
info: ipc_action: minor fix

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: use a safer 'oversize' comparison
Ferry Huberts [Wed, 2 Dec 2015 13:12:24 +0000 (14:12 +0100)]
info: ipc_action: use a safer 'oversize' comparison

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: use a static sink buffer
Ferry Huberts [Wed, 2 Dec 2015 13:06:37 +0000 (14:06 +0100)]
info: ipc_action: use a static sink buffer

That is also a bit larger

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: make the IPv6 if statement like the IPv4 one
Ferry Huberts [Wed, 2 Dec 2015 13:00:35 +0000 (14:00 +0100)]
info: ipc_action: make the IPv6 if statement like the IPv4 one

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: merge 2 if statements
Ferry Huberts [Wed, 2 Dec 2015 13:00:12 +0000 (14:00 +0100)]
info: ipc_action: merge 2 if statements

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: minor simplification
Ferry Huberts [Wed, 2 Dec 2015 12:49:22 +0000 (13:49 +0100)]
info: ipc_action: minor simplification

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: only use addr in debug builds
Ferry Huberts [Wed, 2 Dec 2015 12:47:35 +0000 (13:47 +0100)]
info: ipc_action: only use addr in debug builds

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: move inet_ntop out of condition blocks
Ferry Huberts [Wed, 2 Dec 2015 12:43:27 +0000 (13:43 +0100)]
info: ipc_action: move inet_ntop out of condition blocks

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ipc_action: rename 2 variables
Ferry Huberts [Wed, 2 Dec 2015 12:46:38 +0000 (13:46 +0100)]
info: ipc_action: rename 2 variables

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: write_data: do not move buffers around
Ferry Huberts [Wed, 2 Dec 2015 12:09:58 +0000 (13:09 +0100)]
info: write_data: do not move buffers around

Just loop over all output buffers. Much simpler and much more
memory efficient.

Also place the socket first in the output buffer struct for better
cache efficiency.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: write_data: use a safer 'close the socket' condition
Ferry Huberts [Wed, 2 Dec 2015 12:05:48 +0000 (13:05 +0100)]
info: write_data: use a safer 'close the socket' condition

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: write_data: do not consider an invalid socket for send
Ferry Huberts [Wed, 2 Dec 2015 12:03:11 +0000 (13:03 +0100)]
info: write_data: do not consider an invalid socket for send

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: write_data: properly clean up an output buffer
Ferry Huberts [Wed, 2 Dec 2015 12:02:06 +0000 (13:02 +0100)]
info: write_data: properly clean up an output buffer

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: write_data: add a comment
Ferry Huberts [Wed, 2 Dec 2015 11:59:58 +0000 (12:59 +0100)]
info: write_data: add a comment

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: write_data: do not add invalid sockets to the FD set
Ferry Huberts [Wed, 2 Dec 2015 11:59:46 +0000 (12:59 +0100)]
info: write_data: do not add invalid sockets to the FD set

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: write_data: exit early if there is nothing to send
Ferry Huberts [Wed, 2 Dec 2015 11:58:41 +0000 (12:58 +0100)]
info: write_data: exit early if there is nothing to send

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: there can only be a single command, optimise determine_action
Ferry Huberts [Wed, 2 Dec 2015 11:40:20 +0000 (12:40 +0100)]
info: there can only be a single command, optimise determine_action

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: minor formatting fix
Ferry Huberts [Wed, 2 Dec 2015 11:31:47 +0000 (12:31 +0100)]
info: minor formatting fix

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename a function prototype
Ferry Huberts [Wed, 2 Dec 2015 11:30:08 +0000 (12:30 +0100)]
info: rename a function prototype

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: split out neighbors and 2hop printer functions
Ferry Huberts [Wed, 2 Dec 2015 11:28:50 +0000 (12:28 +0100)]
info: split out neighbors and 2hop printer functions

Making it all more generic

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: rename 'printers' unit
Ferry Huberts [Wed, 2 Dec 2015 09:54:04 +0000 (10:54 +0100)]
txtinfo: rename 'printers' unit

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: rename 'printers' unit
Ferry Huberts [Wed, 2 Dec 2015 09:52:28 +0000 (10:52 +0100)]
jsoninfo: rename 'printers' unit

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: use a define for the info_plugin_config_t plugin parameters
Ferry Huberts [Tue, 1 Dec 2015 21:32:37 +0000 (22:32 +0100)]
info: use a define for the info_plugin_config_t plugin parameters

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: ensure all variables are correctly initialised and cleaned up
Ferry Huberts [Tue, 1 Dec 2015 21:21:20 +0000 (22:21 +0100)]
info: ensure all variables are correctly initialised and cleaned up

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: remove some comments
Ferry Huberts [Tue, 1 Dec 2015 18:23:39 +0000 (19:23 +0100)]
info: remove some comments

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: add some asserts
Ferry Huberts [Tue, 1 Dec 2015 18:23:27 +0000 (19:23 +0100)]
info: add some asserts

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename a function
Ferry Huberts [Tue, 1 Dec 2015 18:22:18 +0000 (19:22 +0100)]
info: rename a function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename PLUGIN_NAME to name
Ferry Huberts [Tue, 1 Dec 2015 18:20:51 +0000 (19:20 +0100)]
info: rename PLUGIN_NAME to name

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename info_plugin_config to config
Ferry Huberts [Tue, 1 Dec 2015 18:19:42 +0000 (19:19 +0100)]
info: rename info_plugin_config to config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename a function parameter
Ferry Huberts [Tue, 1 Dec 2015 18:13:12 +0000 (19:13 +0100)]
info: rename a function parameter

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: rename info_plugin_config to config
Ferry Huberts [Tue, 1 Dec 2015 17:54:56 +0000 (18:54 +0100)]
txtinfo: rename info_plugin_config to config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: rename info_plugin_config to config
Ferry Huberts [Tue, 1 Dec 2015 17:54:46 +0000 (18:54 +0100)]
jsoninfo: rename info_plugin_config to config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: update copyrights
Ferry Huberts [Tue, 1 Dec 2015 17:42:44 +0000 (18:42 +0100)]
info: update copyrights

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename a http header function
Ferry Huberts [Tue, 1 Dec 2015 17:40:23 +0000 (18:40 +0100)]
info: rename a http header function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename header files recursive include guards
Ferry Huberts [Tue, 1 Dec 2015 17:38:28 +0000 (18:38 +0100)]
info: rename header files recursive include guards

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: do not export info_plugin_outbuffer_t, only used internally
Ferry Huberts [Tue, 1 Dec 2015 17:31:24 +0000 (18:31 +0100)]
info: do not export info_plugin_outbuffer_t, only used internally

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename type outbuffer_t to info_plugin_outbuffer_t
Ferry Huberts [Tue, 1 Dec 2015 17:29:05 +0000 (18:29 +0100)]
info: rename type outbuffer_t to info_plugin_outbuffer_t

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: rename variable printer_functions to functions
Ferry Huberts [Wed, 2 Dec 2015 11:02:43 +0000 (12:02 +0100)]
jsoninfo: rename variable printer_functions to functions

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: rename variable printer_functions to functions
Ferry Huberts [Wed, 2 Dec 2015 11:02:40 +0000 (12:02 +0100)]
txtinfo: rename variable printer_functions to functions

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename variable printer_functions to functions
Ferry Huberts [Tue, 1 Dec 2015 17:28:04 +0000 (18:28 +0100)]
info: rename variable printer_functions to functions

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename type printer_functions_t to info_plugin_functions_t
Ferry Huberts [Wed, 2 Dec 2015 11:00:30 +0000 (12:00 +0100)]
info: rename type printer_functions_t to info_plugin_functions_t

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename some http header function parameters
Ferry Huberts [Tue, 1 Dec 2015 17:23:18 +0000 (18:23 +0100)]
info: rename some http header function parameters

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: code formatting
Ferry Huberts [Tue, 1 Dec 2015 17:33:02 +0000 (18:33 +0100)]
info: code formatting

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move code from olsr_jsoninfo into olsr_plugin
Ferry Huberts [Wed, 2 Dec 2015 10:54:22 +0000 (11:54 +0100)]
jsoninfo: move code from olsr_jsoninfo into olsr_plugin

To make it more compact

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: move code from olsr_txtinfo into olsr_plugin
Ferry Huberts [Wed, 2 Dec 2015 10:54:07 +0000 (11:54 +0100)]
txtinfo: move code from olsr_txtinfo into olsr_plugin

To make it more compact

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoMakefile: add pseudo plugin info
Ferry Huberts [Wed, 2 Dec 2015 18:10:27 +0000 (19:10 +0100)]
Makefile: add pseudo plugin info

And make jsoninfo and txtinfo depend on it.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: merge jsoninfo and txtinfo common code
Ferry Huberts [Tue, 1 Dec 2015 18:16:15 +0000 (19:16 +0100)]
info: merge jsoninfo and txtinfo common code

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: wrap generic info plugin configuration in a struct
Ferry Huberts [Wed, 2 Dec 2015 10:48:43 +0000 (11:48 +0100)]
jsoninfo: wrap generic info plugin configuration in a struct

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: wrap generic info plugin configuration in a struct
Ferry Huberts [Wed, 2 Dec 2015 10:48:40 +0000 (11:48 +0100)]
txtinfo: wrap generic info plugin configuration in a struct

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: convert ACTIVATE_VTIME_TXTINFO into a plugin parameter
Ferry Huberts [Tue, 1 Dec 2015 16:11:30 +0000 (17:11 +0100)]
txtinfo: convert ACTIVATE_VTIME_TXTINFO into a plugin parameter

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: convert INFO_ALLOW_LOCALHOST define into a plugin parameter
Ferry Huberts [Wed, 2 Dec 2015 10:43:02 +0000 (11:43 +0100)]
jsoninfo: convert INFO_ALLOW_LOCALHOST define into a plugin parameter

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: convert INFO_ALLOW_LOCALHOST define into a plugin parameter
Ferry Huberts [Wed, 2 Dec 2015 10:42:55 +0000 (11:42 +0100)]
txtinfo: convert INFO_ALLOW_LOCALHOST define into a plugin parameter

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: put output start/end in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:40:11 +0000 (11:40 +0100)]
jsoninfo: put output start/end in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: put output start/end in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:40:07 +0000 (11:40 +0100)]
txtinfo: put output start/end in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: put command parsing in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:32:51 +0000 (11:32 +0100)]
jsoninfo: put command parsing in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: put command parsing in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:32:44 +0000 (11:32 +0100)]
txtinfo: put command parsing in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: put the plugin init hook in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:31:09 +0000 (11:31 +0100)]
jsoninfo: put the plugin init hook in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: put the plugin init hook in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:31:04 +0000 (11:31 +0100)]
txtinfo: put the plugin init hook in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: determine the mime type via the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:29:40 +0000 (11:29 +0100)]
jsoninfo: determine the mime type via the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: determine the mime type via the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:29:32 +0000 (11:29 +0100)]
txtinfo: determine the mime type via the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: only need to reset entry number for json output
Ferry Huberts [Tue, 1 Dec 2015 14:09:13 +0000 (15:09 +0100)]
jsoninfo: only need to reset entry number for json output

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: wrap the outbuffer in a struct for easier usage
Ferry Huberts [Wed, 2 Dec 2015 10:25:43 +0000 (11:25 +0100)]
jsoninfo: wrap the outbuffer in a struct for easier usage

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: wrap the outbuffer in a struct for easier usage
Ferry Huberts [Wed, 2 Dec 2015 10:25:39 +0000 (11:25 +0100)]
txtinfo: wrap the outbuffer in a struct for easier usage

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move SIW_x defines into common code
Ferry Huberts [Wed, 2 Dec 2015 10:24:08 +0000 (11:24 +0100)]
jsoninfo: move SIW_x defines into common code

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: move SIW_x defines into common code
Ferry Huberts [Wed, 2 Dec 2015 10:24:04 +0000 (11:24 +0100)]
txtinfo: move SIW_x defines into common code

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use a table of function pointers in send_info
Ferry Huberts [Tue, 1 Dec 2015 15:41:42 +0000 (16:41 +0100)]
jsoninfo: use a table of function pointers in send_info

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: use a table of function pointers in send_info
Ferry Huberts [Tue, 1 Dec 2015 08:53:38 +0000 (09:53 +0100)]
txtinfo: use a table of function pointers in send_info

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move ipc_print_* functions into a 'printers' unit
Ferry Huberts [Tue, 1 Dec 2015 07:31:04 +0000 (08:31 +0100)]
jsoninfo: move ipc_print_* functions into a 'printers' unit

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>