Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c4a10f8c9 | ||
|
|
8bdba6f2a5 | ||
|
|
4e2a5b603d |
@@ -33,7 +33,7 @@
|
|||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
#include "../../LibTeleinfo.h"
|
#include "../../src/LibTeleinfo.h"
|
||||||
|
|
||||||
// ----------------
|
// ----------------
|
||||||
// Constants
|
// Constants
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "LibTeleinfo",
|
"name": "LibTeleinfo",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"keywords": "teleinfo, french, meter, power, erdf, linky, tic",
|
"keywords": "teleinfo, french, meter, power, erdf, linky, tic",
|
||||||
"description": "Decoder for Teleinfo (aka TIC) from French smart power meters",
|
"description": "Decoder for Teleinfo (aka TIC) from French smart power meters",
|
||||||
"repository":
|
"repository":
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name=LibTeleinfo
|
name=LibTeleinfo
|
||||||
version=1.1.1
|
version=1.1.2
|
||||||
author=Charles-Henri Hallard <hallard.me>
|
author=Charles-Henri Hallard <hallard.me>
|
||||||
maintainer=Charles-Henri Hallard <community.hallard.me>
|
maintainer=Charles-Henri Hallard <community.hallard.me>
|
||||||
sentence=Decoder for Teleinfo (aka TIC) from French smart power meters
|
sentence=Decoder for Teleinfo (aka TIC) from French smart power meters
|
||||||
|
|||||||
@@ -422,12 +422,12 @@ char * TInfo::valueGet(char * name, char * value)
|
|||||||
me = me->next;
|
me = me->next;
|
||||||
|
|
||||||
// Check if we match this LABEL
|
// Check if we match this LABEL
|
||||||
if (lgname==strlen(me->name) && strncmp(me->name, name, lgname)==0) {
|
if (lgname==strlen(me->name) && strcmp(me->name, name)==0) {
|
||||||
// this one has a value ?
|
// this one has a value ?
|
||||||
if (me->value) {
|
if (me->value) {
|
||||||
// copy to dest buffer
|
// copy to dest buffer
|
||||||
uint8_t lgvalue = strlen(me->value);
|
uint8_t lgvalue = strlen(me->value);
|
||||||
strlcpy(value, me->value , lgvalue );
|
strlcpy(value, me->value , lgvalue + 1 );
|
||||||
return ( value );
|
return ( value );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -662,7 +662,7 @@ ValueList * TInfo::checkLine(char * pline)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// Get our own working copy
|
// Get our own working copy
|
||||||
strlcpy( buff, _recv_buff, len+1);
|
strlcpy( buff, pline, len+1);
|
||||||
|
|
||||||
p = &buff[0];
|
p = &buff[0];
|
||||||
ptok = p; // for sure we start with token name
|
ptok = p; // for sure we start with token name
|
||||||
|
|||||||
Reference in New Issue
Block a user