Debian Codegraph @

debian/patches/fix-storing-local-variables

raw
1 Index: collectd/src/capabilities.c
2 ===================================================================
3 --- collectd.orig/src/capabilities.c
4 +++ collectd/src/capabilities.c
5 @@ -56,6 +56,8 @@ static char *httpd_host = NULL;
6 static unsigned short httpd_port = 9104;
7 static struct MHD_Daemon *httpd;
8
9 +static int mhd_cls = 44;
10 +
11 static dmi_type_name_t types_list[] = {
12 {BIOS, "BIOS"},
13 {SYSTEM, "SYSTEM"},
14 @@ -206,7 +208,7 @@ static MHD_RESULT cap_http_handler(void
15 * round. The docs are not very specific on the issue. */
16 if (*connection_state == NULL) {
17 /* set to a random non-NULL pointer. */
18 - *connection_state = &(int){44};
19 + *connection_state = &mhd_cls;
20 return MHD_YES;
21 }
22 DEBUG(CAP_PLUGIN ": formatted response: %s", g_cap_json);
23 Index: collectd/src/write_prometheus.c
24 ===================================================================
25 --- collectd.orig/src/write_prometheus.c
26 +++ collectd/src/write_prometheus.c
27 @@ -63,6 +63,7 @@ static pthread_mutex_t metrics_lock = PT
28 static char *httpd_host = NULL;
29 static unsigned short httpd_port = 9103;
30 static struct MHD_Daemon *httpd;
31 +static int mhd_cls = 42;
32
33 static cdtime_t staleness_delta = PROMETHEUS_DEFAULT_STALENESS_DELTA;
34
35 @@ -247,7 +248,7 @@ static MHD_RESULT http_handler(void *cls
36 * very specific on the issue. */
37 if (*connection_state == NULL) {
38 /* set to a random non-NULL pointer. */
39 - *connection_state = &(int){42};
40 + *connection_state = &mhd_cls;
41 return MHD_YES;
42 }
43