PROFILE PUTS command logging added.

Tue, 02 Sep 2014 15:14:53 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 02 Sep 2014 15:14:53 +0200
changeset 280
de3dc781ba65
parent 279
4c505414435c
child 281
12a5dbbfd0e3

PROFILE PUTS command logging added.

thermferm/server.c file | annotate | diff | comparison | revisions
--- a/thermferm/server.c	Tue Sep 02 15:07:34 2014 +0200
+++ b/thermferm/server.c	Tue Sep 02 15:14:53 2014 +0200
@@ -914,6 +914,7 @@
 	    if (strcmp(profile->uuid, param) == 0) {
 
 		if (profile->steps) {
+		    syslog(LOG_NOTICE, "PROFILE PUTS %s erased all old steps", profile->uuid);
 		    for (step = profile->steps; step; step = olds) {
 			olds = step->next;
 			free(step);
@@ -921,6 +922,7 @@
 		    profile->steps = NULL;		    
 		}
 
+		j = 0;
             	while (1) {	
 	    	    memset((char *)&ibuf, 0, SS_BUFSIZE);
             	    fromlen = sizeof(peeraddr_in);
@@ -960,6 +962,9 @@
 				(sscanf(rest, "%d", &irest) == 1) &&
 				(sscanf(targ, "%f", &ftarg) == 1)) {
 
+				j++;
+				syslog(LOG_NOTICE, "PROFILE PUTS %s add step %d: steptime=%d resttime=%d target=%.1f", 
+						profile->uuid, j, istep, irest, ftarg);
 				step = (prof_step *)malloc(sizeof(prof_step));
 				step->next = NULL;
 				step->version = 1;

mercurial