support negative lat in CSV payloads

This commit is contained in:
Jan-Piet Mens 2016-03-20 08:25:15 +01:00
parent d3088fa222
commit 291d0ef69b

View File

@ -202,7 +202,7 @@ void republish(struct mosquitto *mosq, struct udata *userdata, char *username, c
*/
// TID , TST , T , LAT , LON , COG , VEL , ALT , DIST , TRIP
#define CSV_RE "^([[:alnum:]]+),([[:xdigit:]]+),[[:alnum:]],[[:digit:]]+,[[:digit:]]+,[[:digit:]]+,[[:digit:]]+,[[:digit:]]+,[[:digit:]]+,[[:digit:]]+$"
#define CSV_RE "^([[:alnum:]]+),([[:xdigit:]]+),[[:alnum:]],-?[[:digit:]]+,-?[[:digit:]]+,[[:digit:]]+,[[:digit:]]+,[[:digit:]]+,[[:digit:]]+,[[:digit:]]+$"
static int csv_looks_sane(char *payload)
{