X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_restore.c;h=cc9b9c655b31a9c8da3198d223152ef4a86aa4ab;hb=7412ab0c1230f2609313913793f9e6c0a93b28b1;hp=46a79b5a59e04d1c8510159a16d7fc3d16a3dac5;hpb=a7066853475167aeeaec21a2405189c5afd231f9;p=rrdtool.git diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 46a79b5..cc9b9c6 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -2,7 +2,9 @@ * RRDtool 1.3.2 Copyright by Tobi Oetiker, 1997-2009 ***************************************************************************** * rrd_restore.c Contains logic to parse XML input and create an RRD file - * initial libxml2 version of rrd_restore (c) by Florian octo Forster + * This file: + * Copyright (C) 2008 Florian octo Forster (original libxml2 code) + * Copyright (C) 2008,2009 Tobias Oetiker ***************************************************************************** * $Id$ *************************************************************************** */ @@ -1212,7 +1214,7 @@ int rrd_restore( char **argv) { rrd_t *rrd; - + char *old_locale; /* init rrd clean */ optind = 0; opterr = 0; /* initialize getopt */ @@ -1254,7 +1256,16 @@ int rrd_restore( return (-1); } +#ifdef HAVE_SETLOCALE + old_locale = setlocale(LC_NUMERIC, "C"); +#endif + rrd = parse_file(argv[optind]); + +#ifdef HAVE_SETLOCALE + setlocale(LC_NUMERIC, old_locale); +#endif + if (rrd == NULL) return (-1);