File: Do-not-disable-timeout-cleanup-on-watch-cleanup.patch

package info (click to toggle)
avahi 0.8-16
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,700 kB
  • sloc: ansic: 40,980; sh: 6,061; xml: 4,594; cs: 2,185; makefile: 1,742; python: 441; cpp: 224; sed: 16
file content (26 lines) | stat: -rw-r--r-- 962 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Gustavo Noronha Silva <gustavo@noronha.dev.br>
Date: Sun, 2 Jan 2022 22:29:04 -0300
Subject: Do not disable timeout cleanup on watch cleanup

This was causing timeouts to never be removed from the linked list that
tracks them, resulting in both memory and CPU usage to grow larger over
time.

Origin: https://github.com/avahi/avahi/commit/b3ad387c74f20368f6dcf60f97d20a3bf8ba9782
---
 avahi-common/simple-watch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c
index 08d8090..2a4a989 100644
--- a/avahi-common/simple-watch.c
+++ b/avahi-common/simple-watch.c
@@ -238,7 +238,7 @@ static void cleanup_watches(AvahiSimplePoll *s, int all) {
             destroy_watch(w);
     }
 
-    s->timeout_req_cleanup = 0;
+    s->watch_req_cleanup = 0;
 }
 
 static AvahiTimeout* timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) {