From 87c494c75ae11713306324e28b0fc345a60ad928 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 24 Apr 2010 00:05:36 +0000 Subject: [PATCH] sample fix --- serial_console/sample_sensors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 1.7.10.4