Skip to content

Commit

Permalink
Make clients delta events local (too many from the network camera)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fb-martin committed Sep 9, 2024
1 parent 739f132 commit 8d85832
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hc_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static void hc_background (int fd, int mode) {

if (hc_http_attach_ntp() && (now >= LastActivityCheck + 5)) {

// Generate events for new or unsynchronized clients.
// Generate local events for new or unsynchronized clients.
// We generate a local "cache" of known clients to limit the number of
// events generated when the clent is not synchronized. The cache key
// is the low 7 bits of the IP address, plus the ninth bit: this works
Expand Down Expand Up @@ -209,8 +209,9 @@ static void hc_background (int fd, int mode) {
((client->origin.tv_usec - client->local.tv_usec) / 1000);
unit = "MS";
}
houselog_event ("CLIENT", hc_broadcast_format (&(client->address)),
"ACTIVE", "DELTA %d %s", delta, unit);
houselog_event_local ("CLIENT",
hc_broadcast_format (&(client->address)),
"ACTIVE", "DELTA %d %s", delta, unit);
client->logged = 1;
}

Expand Down

0 comments on commit 8d85832

Please sign in to comment.