From: Bernhard Tittelbach Date: Sat, 24 Apr 2010 00:05:36 +0000 (+0000) Subject: sample fix X-Git-Url: https://git.realraum.at/?p=svn42.git;a=commitdiff_plain;h=87c494c75ae11713306324e28b0fc345a60ad928 sample fix --- diff --git a/serial_console/sample_sensors.c b/serial_console/sample_sensors.c index 7bfc7da..03b241d 100644 --- a/serial_console/sample_sensors.c +++ b/serial_console/sample_sensors.c @@ -34,12 +34,12 @@ unsigned int collect_data(char *buffer, unsigned int size) } else if (size > 8 && strncmp("photo0:", buffer, 7) == 0) { - if (asprintf(&cmd, "rrdtool update %s -t light N:%s", rrd_light_, buffer + 7)) + if (asprintf(&cmd, "rrdtool update %s -t light N:%s", rrd_light_, buffer + 8)) { /*printf("%s\n",cmd);*/ system(cmd); free(cmd); - } + } } return 0; }