MCPcopy Create free account
hub / github.com/3proxy/3proxy / doschedule

Function doschedule

src/3proxy.c:172–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void doschedule(void){
173 struct schedule *sched, *prevsched = NULL, *nextsched;
174 int res;
175
176 conf.time = time(0);
177 for(sched=schedule; sched; sched=sched->next){
178 if(conf.needreload || conf.timetoexit || (conf.time > sched->start_time && timechanged(sched->start_time, conf.time, sched->type))){
179 sched->start_time = conf.time;
180 nextsched = sched->next;
181 res = (*sched->function)(sched->data);
182 switch(res){
183 case 1:
184 if(prevsched) prevsched->next = nextsched;
185 else schedule = nextsched;
186 break;
187 }
188 }
189 prevsched = sched;
190 }
191}
192
193void dumpcounters(struct trafcount *tlin, int counterd){
194

Callers 1

cyclestepFunction · 0.85

Calls 1

timechangedFunction · 0.85

Tested by

no test coverage detected