# HG changeset patch # User Michiel Broek # Date 1409663254 -7200 # Node ID 4c505414435cb9c293f32652a8d7a7b8166f02ae # Parent 76c8a6f18e4d787b7aef45ba51c104d8a02b50b4 PROFILE PUT command logging added. diff -r 76c8a6f18e4d -r 4c505414435c thermferm/server.c --- a/thermferm/server.c Tue Sep 02 15:02:33 2014 +0200 +++ b/thermferm/server.c Tue Sep 02 15:07:34 2014 +0200 @@ -871,12 +871,18 @@ val = strtok(NULL, "\0"); if (kwd && val) { if (strcmp(kwd, (char *)"NAME") == 0) { - if (profile->name) + if (profile->name) { + if (strcmp(profile->name, val)) + syslog(LOG_NOTICE, "Profile %s name `%s' to `%s'", profile->uuid, profile->name, val); free(profile->name); + } profile->name = xstrcpy(val); } else if (strcmp(kwd, (char *)"INITTEMP") == 0) { - if (sscanf(val, "%f", &fval) == 1) + if (sscanf(val, "%f", &fval) == 1) { + if (profile->inittemp != fval) + syslog(LOG_NOTICE, "Profile %s initial temperature %.1f to %.1f", profile->uuid, profile->inittemp, fval); profile->inittemp = fval; + } } } }