Subversion Repositories heizung

Rev

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

Rev 2 Rev 3
Line 81... Line 81...
81
 
81
 
82
	HeizFirst = NULL;
82
	HeizFirst = NULL;
83
	readConf();
83
	readConf();
84
	// Now daemonize this application
84
	// Now daemonize this application
85
	daemon_start(0);
85
	daemon_start(0);
86
	changeToUser(configs.usr, configs.grp);
86
	changeToUser(configs.User, configs.Grp);
87
	// Now start our Thread
87
	// Now start our Thread
88
	if (pthread_create(&pthr_pars, NULL, pthr_parser, (void *)0) != 0)
88
	if (pthread_create(&pthr_pars, NULL, pthr_parser, (void *)0) != 0)
89
	{
89
	{
90
	   syslog (LOG_DAEMON,"Create of thread \"pthr_parser\" failed!");
90
	   syslog (LOG_DAEMON,"Create of thread \"pthr_parser\" failed!");
91
	   return 1;
91
	   return 1;
Line 341... Line 341...
341
	      i++;
341
	      i++;
342
	      act = act->next;
342
	      act = act->next;
343
	   }
343
	   }
344
	}
344
	}
345
 
345
 
346
	if (strcasecmp(bef, "GET WDAY")		// Write out a particular week day
346
	if (strcasecmp(bef, "GET WDAY"))		// Write out a particular week day
347
	{
347
	{
348
	int wday = atoi(cmd);
348
	int wday = atoi(cmd);
349
 
349
 
350
	   if (wday < 1 || wday > 7)
350
	   if (wday < 1 || wday > 7)
351
	   {
351
	   {
Line 782... Line 782...
782
		       if (hour >= 0 && hour <= 23 && min >= 0 && min <= 59)
782
		       if (hour >= 0 && hour <= 23 && min >= 0 && min <= 59)
783
		       {
783
		       {
784
			  act->heizung->end = hour * 3600 + min;
784
			  act->heizung->end = hour * 3600 + min;
785
 
785
 
786
			  if (act->next)
786
			  if (act->next)
787
			     axt->next->start = hour * 3600 + min;
787
			     act->next->start = hour * 3600 + min;
788
		       }
788
		       }
789
		    }
789
		    }
790
		 break;
790
		 break;
791
 
791
 
792
		 case 3:	// temperature
792
		 case 3:	// temperature