Changeset 8237
- Timestamp:
- 01/30/13 01:05:48 (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/globals.h
r8226 r8237 206 206 #define CS_BIND_TIMEOUT 120 207 207 #define CS_DELAY 0 208 #define CS_ECM_RINGBUFFER_MAX 20// max size for ECM last responsetimes ringbuffer208 #define CS_ECM_RINGBUFFER_MAX 0x0F // max size for ECM last responsetimes ringbuffer 209 209 210 210 #ifndef PTHREAD_STACK_MIN -
trunk/module-webif.c
r8226 r8237 5396 5396 5397 5397 void webif_client_add_lastresponsetime(struct s_client *cl, int32_t ltime, time_t timestamp, int32_t rc) { 5398 if (cl->cwlastresptimes_last == CS_ECM_RINGBUFFER_MAX - 1) { 5399 cl->cwlastresptimes_last = 0; 5400 } else { 5401 cl->cwlastresptimes_last++; 5402 } 5403 cl->cwlastresptimes[cl->cwlastresptimes_last].duration = ltime > 9999 ? 9999 : ltime; 5404 cl->cwlastresptimes[cl->cwlastresptimes_last].timestamp = timestamp; 5405 cl->cwlastresptimes[cl->cwlastresptimes_last].rc = rc; 5398 int32_t last = cl->cwlastresptimes_last = (cl->cwlastresptimes_last + 1) & CS_ECM_RINGBUFFER_MAX; 5399 cl->cwlastresptimes[last].duration = ltime > 9999 ? 9999 : ltime; 5400 cl->cwlastresptimes[last].timestamp = timestamp; 5401 cl->cwlastresptimes[last].rc = rc; 5406 5402 } 5407 5403
Note:
See TracChangeset
for help on using the changeset viewer.