Subversion Repositories heating

Rev

Rev 45 | Rev 49 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 45 Rev 46
Line 84... Line 84...
84
			char hv0[48];
84
			char hv0[48];
85
 
85
 
86
			hour = (int)(t / 3600);
86
			hour = (int)(t / 3600);
87
			min = (int)((t - (time_t)hour * 3600) / 60);
87
			min = (int)((t - (time_t)hour * 3600) / 60);
88
			sprintf(hv0, "%02d:%02d", hour, min);
88
			sprintf(hv0, "%02d:%02d", hour, min);
89
 
-
 
90
			if (Configure.debug)
-
 
91
				syslog(LOG_DEBUG, "t=%lu, hour=%d, min=%d, erg=%s", t, hour, min, hv0);
-
 
92
 
-
 
93
			string zeit(hv0);
89
			string zeit(hv0);
94
			return zeit;
90
			return zeit;
95
		}
91
		}
96
 
92
 
97
		inline static void setGlobals(double *n, double *a, bool *m)
93
		inline static void setGlobals(double *n, double *a, bool *m)
Line 378... Line 374...
378
int *HttpController::room = nullptr;
374
int *HttpController::room = nullptr;
379
html::HTCONF *HttpController::HeatConf;
375
html::HTCONF *HttpController::HeatConf;
380
HttpController::REQUEST HttpController::rq = HttpController::REQUEST::NONE;
376
HttpController::REQUEST HttpController::rq = HttpController::REQUEST::NONE;
381
 
377
 
382
std::string html::intErrorPage;
378
std::string html::intErrorPage;
-
 
379
bool html::datar = false;
383
 
380
 
384
html::html()
381
html::html()
385
{
382
{
386
	enableDebug(Configure.debug);
383
	enableDebug(Configure.debug);
387
	HeatConf = nullptr;
384
	HeatConf = nullptr;
Line 671... Line 668...
671
					}
668
					}
672
				}
669
				}
673
 
670
 
674
				akt = akt->next;
671
				akt = akt->next;
675
			}
672
			}
-
 
673
 
-
 
674
			datar = true;
676
		}
675
		}
677
 
676
 
678
		if (HttpController::getLastRequest() == HttpController::REQUEST::GLOBALS)
677
		if (HttpController::getLastRequest() == HttpController::REQUEST::GLOBALS)
679
		{
678
		{
680
			query = "update glbheat set night = ";
679
			query = "update glbheat set night = ";
Line 689... Line 688...
689
				syslog(LOG_WARNING, "SQL error [%s]: %s", query.c_str(), zErrMsg);
688
				syslog(LOG_WARNING, "SQL error [%s]: %s", query.c_str(), zErrMsg);
690
				sqlite3_free(zErrMsg);
689
				sqlite3_free(zErrMsg);
691
				sqlite3_close(db);
690
				sqlite3_close(db);
692
				return;
691
				return;
693
			}
692
			}
-
 
693
 
-
 
694
			datar = true;
694
		}
695
		}
695
 
696
 
696
		sqlite3_close(db);
697
		sqlite3_close(db);
697
 
698
 
698
		if (Configure.debug)
699
		if (Configure.debug)