From 0c39096830fa455642ad1970c8a28dcfac64a47f Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 14 Dec 2014 13:20:32 +0800 Subject: fix config parsing Signed-off-by: Andy Green --- aepd/websocket-protocol.c | 3 ++- config | 2 +- libarmep/configuration.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/aepd/websocket-protocol.c b/aepd/websocket-protocol.c index 666827d..073c211 100644 --- a/aepd/websocket-protocol.c +++ b/aepd/websocket-protocol.c @@ -64,7 +64,8 @@ static int callback_http(struct libwebsocket_context *context, if (libwebsockets_serve_http_file(context, wsi, buf, whitelist[n].mimetype, NULL, 0)) - fprintf(stderr, "Failed to send HTTP file\n"); + //fprintf(stderr, "Failed to send HTTP file\n"); + break; break; default: diff --git a/config b/config index dffbe7e..344161e 100644 --- a/config +++ b/config @@ -5,5 +5,5 @@ msm8916-qrd # /dev/serial/by-id/usb-NXP_SEMICOND_ARM_Energy_Probe_S_NO12300012-if00 - V5.0 0.330000 -14.500000 -0.179000 13.363000 -0.000000 0.163300 0 V5.0 DC_IN #ff0000 SoC + V5.0 0.033000 -14.500000 -0.179000 13.363000 -0.000000 0.163300 0 V5.0 DC_IN #ff0000 SoC diff --git a/libarmep/configuration.c b/libarmep/configuration.c index 98070cd..2db43a4 100755 --- a/libarmep/configuration.c +++ b/libarmep/configuration.c @@ -239,7 +239,7 @@ int configure(struct aep_context *aep_context, struct aep *aep, const char *dev_ parser = ACPP_SKIP; continue; } - aep_context->device_paths[stanza++][copy_pos++] = c; + aep_context->device_paths[++stanza][copy_pos++] = c; aep_context->device_paths[stanza][copy_pos] = '\0'; actions = APCA_MATCH_DEVPATH; } -- cgit v1.2.3