thermferm/server.c

changeset 279
4c505414435c
parent 278
76c8a6f18e4d
child 280
de3dc781ba65
equal deleted inserted replaced
278:76c8a6f18e4d 279:4c505414435c
869 } 869 }
870 kwd = strtok(ibuf, ",\0"); 870 kwd = strtok(ibuf, ",\0");
871 val = strtok(NULL, "\0"); 871 val = strtok(NULL, "\0");
872 if (kwd && val) { 872 if (kwd && val) {
873 if (strcmp(kwd, (char *)"NAME") == 0) { 873 if (strcmp(kwd, (char *)"NAME") == 0) {
874 if (profile->name) 874 if (profile->name) {
875 if (strcmp(profile->name, val))
876 syslog(LOG_NOTICE, "Profile %s name `%s' to `%s'", profile->uuid, profile->name, val);
875 free(profile->name); 877 free(profile->name);
878 }
876 profile->name = xstrcpy(val); 879 profile->name = xstrcpy(val);
877 } else if (strcmp(kwd, (char *)"INITTEMP") == 0) { 880 } else if (strcmp(kwd, (char *)"INITTEMP") == 0) {
878 if (sscanf(val, "%f", &fval) == 1) 881 if (sscanf(val, "%f", &fval) == 1) {
882 if (profile->inittemp != fval)
883 syslog(LOG_NOTICE, "Profile %s initial temperature %.1f to %.1f", profile->uuid, profile->inittemp, fval);
879 profile->inittemp = fval; 884 profile->inittemp = fval;
885 }
880 } 886 }
881 } 887 }
882 } 888 }
883 } 889 }
884 } 890 }

mercurial