Code

network plugin: Copy received value-lists before dispatching them.
authorSebastian Harl <sh@tokkee.org>
Fri, 20 May 2011 09:55:50 +0000 (11:55 +0200)
committerSebastian Harl <sh@tokkee.org>
Mon, 9 Jan 2012 17:26:49 +0000 (18:26 +0100)
commit9756728149b2ebd2ccb9e0550a0602f6559092b8
treea659b15411386025b946cc0ef9412c9ad7ae1f95
parent7e6f12dfba76b295d40e835d310d69d625ede88e
network plugin: Copy received value-lists before dispatching them.

A network packet may contain some parts (e.g. hostname) only once. When
parsing the packet, the network plugin incrementally builds up the value list
and dispatches it after parsing a value. This may happen several times without
changing other parts (like the hostname).

However, using the filter-chains, those "static" parts may be overwritten /
modified while dispatching the values. Thus, they cannot reliably be reused
after calling plugin_dispatch_values(). Copying the value list to a temporary
list fixes this.
src/network.c