summaryrefslogtreecommitdiff
path: root/community/sensors-applet/FS9379.patch
blob: 5fee4e20fd17443945a753078737049466636567 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- sensors-applet-2.2.1.orig/plugins/nvidia/nvidia-plugin.c
+++ sensors-applet-2.2.1/plugins/nvidia/nvidia-plugin.c
@@ -81,7 +81,7 @@
 	/* create the connection to the X server */
 	if (!(nvidia_sensors_dpy = XOpenDisplay(NULL))) {
 		/* no connection to the X server avaible */
-		return;
+		return sensors;
 	}
 
 	/* check if the NV-CONTROL extension is available on this X
only in patch2:
unchanged:
--- sensors-applet-2.2.1.orig/plugins/libsensors/libsensors-plugin.c
+++ sensors-applet-2.2.1/plugins/libsensors/libsensors-plugin.c
@@ -258,7 +258,8 @@
 	 * file - if neither succeed, exit */
 	if ((file = fopen (LIBSENSORS_CONFIG_FILE, "r")) == NULL) {
 		if ((file = fopen (LIBSENSORS_ALTERNATIVE_CONFIG_FILE, "r")) == NULL) {
-			return;
+                        g_debug("%s: error opening libsensors config file... ", __FUNCTION__);
+			return sensors;
 		}
 	}
 	
@@ -266,7 +267,8 @@
 	 * valid, close file and return */
 	if (sensors_init(file) != 0) {
 		fclose(file);
-		return;
+                g_debug("%s: error initing libsensors from config file...", __FUNCTION__);
+		return sensors;
 	}
 	fclose(file);
 
@@ -293,7 +295,8 @@
         
         int nr = 0;
         if (sensors_init(NULL) != 0) {
-                return;
+                g_debug("%s: error initing libsensors", __FUNCTION__);
+                return sensors;
         }
 	i = 0;
 	while ((chip_name = sensors_get_detected_chips(NULL, &nr)))
@@ -502,7 +505,7 @@
 	if (regcomp(&uri_re, "^sensor://([a-z0-9-]+)/([0-9]+)$", 
                     REG_EXTENDED | REG_ICASE) != 0) {
                 g_debug("Error compiling regexp...not initing libsensors sensors interface");
-                return;
+                return NULL;
         }
         
 	return libsensors_plugin_get_sensors();