Hi Kevin,

Today kevin brintnall wrote:

>  - only copy as many bytes as necessary
>  - during journal replay, avoid unnecessary copy (string is discarded)
>
> Thank you Thorsten von Eicken <t...@rightscale.com>

you di have perfect timing :-) so it will be an 1.4.1 announement today. But I
guess the performance impact is well worth it. Thank you!

cheers
tobi


> ---
>  src/rrd_daemon.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
> index 0ca1818..1946003 100644
> --- a/src/rrd_daemon.c
> +++ b/src/rrd_daemon.c
> @@ -1312,7 +1312,8 @@ static int handle_request_update (HANDLER_PROTO) /* {{{ 
> */
>    cache_item_t *ci;
>
>    /* save it for the journal later */
> -  strncpy(orig_buf, buffer, sizeof(orig_buf)-1);
> +  if (sock != NULL)
> +    strncpy(orig_buf, buffer, buffer_size);
>
>    status = buffer_get_field (&buffer, &buffer_size, &file);
>    if (status != 0)
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch t...@oetiker.ch ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-developers mailing list
rrd-developers@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers

Reply via email to