[Xfce4-commits] [panel-plugins/xfce4-sensors-plugin] 01/01: Updated news file with latest versions; bug 9395 fixed as much as possible; preparing for version 1.2.6.
noreply at xfce.org
noreply at xfce.org
Mon Apr 28 23:41:56 CEST 2014
This is an automated email from the git hooks/post-receive script.
timystery pushed a commit to branch master
in repository panel-plugins/xfce4-sensors-plugin.
commit 23813c9619dcb67f7509f9b79ffb9aeaec62908a
Author: Fabian <timystery at arcor.de>
Date: Mon Apr 28 23:32:39 2014 +0200
Updated news file with latest versions;
bug 9395 fixed as much as possible;
preparing for version 1.2.6.
---
NEWS | 2 +-
NOTES | 3 +--
README | 5 ++---
configure.in.in | 5 ++---
lib/configuration.c | 14 +++++++++-----
lib/hddtemp.c | 16 ++++++++++++----
ltmain.sh | 4 ++--
7 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/NEWS b/NEWS
index 108440b..326261b 100644
--- a/NEWS
+++ b/NEWS
@@ -24,4 +24,4 @@
Labels in text view possible
Remember window size of configuration dialog
Respect "suppress messages" for error dialogs with acpi/sysfs
-
+1.2.5
diff --git a/NOTES b/NOTES
index 504a98b..5357363 100644
--- a/NOTES
+++ b/NOTES
@@ -10,5 +10,4 @@ hddtemp is no longer searched at run-time, it is only enabled at compile-time.
If you know of any further OS-specific interface or system library that might be worth including, please tell me.
-For hddtemp to work for users in the plugin, it must be setuid root or a hddtemp daemon must be running. if none of this is done, it cant display the hddtemp. A possible workaround consists of adding a wrapper script as option to --with-pathhddtemp, that will call sudo on hddtmep.
-
+For hddtemp to work for users in the plugin, it must be setuid root or a hddtemp daemon must be running. If none of this is the case, the plugin can't display the hard disk temperatures. A possible workaround consists of adding a wrapper script as option to --with-pathhddtemp, that will call sudo on hddtemp.
diff --git a/README b/README
index 2072b07..87429eb 100644
--- a/README
+++ b/README
@@ -1,9 +1,9 @@
Xfce4-Sensors-Plugin
====================
-Version 1.0.0 - For Xfce 4 Panel 4.6.0 (and hopefully newer as well!)
+Version 1.2.6 - For Xfce 4 Panel 4.6.0 (and hopefully newer as well!)
-Copyright (c) 2004-2009 by Fabian Nowak (timystery at arcor.de)
+Copyright (c) 2004-2014 by Fabian Nowak (timystery at arcor.de)
Copyright (c) 2005-2006 by Stefan Ott
Licence: GPL version 2 (or later at your option)
@@ -28,4 +28,3 @@ Bugs: Refer to TODO file
Thanks to: Xfce Team and Enrico Tröger for additional help;
Raphael Groner for bug-hunting, usability reports, feature requests.
-
diff --git a/configure.in.in b/configure.in.in
index a2ad263..783c0d9 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -4,14 +4,14 @@ dnl
dnl xfce4-sensors-plugin - Sensors plugin for xfce4-panel
dnl
dnl 2003,2004, 2007 Benedikt Meurer <benny at xfce.org>
-dnl 2007-2011 Fabian Nowak <timystery at arcor.de>
+dnl 2007-2011,2014 Fabian Nowak <timystery at arcor.de>
dnl
m4_define([libxfce4sensors_verinfo], [3:4:2])
m4_define([xfce4_sensors_version_major], [1])
m4_define([xfce4_sensors_version_minor], [2])
-m4_define([xfce4_sensors_version_micro], [5])
+m4_define([xfce4_sensors_version_micro], [6])
m4_define([xfce4_sensors_version_nano], [])
m4_define([xfce4_sensors_version_build], [@REVISION@])
m4_define([xfce4_sensors_version_tag], [git]) dnl may be set to 'git'
@@ -431,4 +431,3 @@ echo "Full debug is disabled"
fi
echo
echo "==============================================================="
-
diff --git a/lib/configuration.c b/lib/configuration.c
index 7a14e91..52e6c41 100644
--- a/lib/configuration.c
+++ b/lib/configuration.c
@@ -327,17 +327,21 @@ sensors_read_config (XfcePanelPlugin *plugin, t_sensors *sensors)
/* assert that file does not contain more information
than does exist on system */
/* ??? At least, it works. */
+ //DBG("number of chip from file: %d, number of expected or known chips: %d.\n", num_sensorchip, sensors->num_sensorchips);
g_return_if_fail (num_sensorchip < sensors->num_sensorchips);
+ //DBG ("Success.\n");
/* now featuring enhanced string comparison */
//g_assert (chip!=NULL);
k = 0;
do {
chip = (t_chip *) g_ptr_array_index (sensors->chips, k++);
- if (chip==NULL)
+ if (chip==NULL || k==sensors->num_sensorchips)
break;
+ //DBG("k=%d, chip=%p, name=.\n", k, chip);
}
- while ( strcmp(chip->sensorId, sensorName) != 0 );
+ while (chip!=NULL && strcmp(chip->sensorId, sensorName) != 0 );
+ //DBG("Found a chip.\n");
if ( chip!=NULL && strcmp(chip->sensorId, sensorName)==0 ) {
for (j=0; j<chip->num_features; j++) {
@@ -410,13 +414,13 @@ sensors_read_config (XfcePanelPlugin *plugin, t_sensors *sensors)
} /* end for features */
- } /* end if */
+ } /* end if chip && strcmp */
g_free (sensorName);
- } /* end if */
+ } /* end if xfce_rc_has_group (rc, rc_chip) */
- } /* end for */
+ } /* end for num_sensorchips */
xfce_rc_close (rc);
diff --git a/lib/hddtemp.c b/lib/hddtemp.c
index 4a8a5a4..e23aa19 100644
--- a/lib/hddtemp.c
+++ b/lib/hddtemp.c
@@ -213,13 +213,17 @@ void
read_disks_netcat (t_chip *chip)
{
char reply[REPLY_MAX_SIZE], *tmp, *tmp2, *tmp3;
- size_t result;
+ int result;
t_chipfeature *cf;
bzero(&reply, REPLY_MAX_SIZE);
result = get_hddtemp_d_str(reply, REPLY_MAX_SIZE);
DBG ("reply=%s with result=%d\n", reply, (int) result);
+ if (result==-1)
+ {
+ return;
+ }
tmp = str_split (reply, DOUBLE_DELIMITER);
do {
@@ -391,9 +395,9 @@ initialize_hddtemp (GPtrArray *chips, gboolean *suppressmessage)
{
#ifndef HAVE_NETCAT
int generation, major, result;
+ struct utsname *p_uname = NULL;
#endif
int retval;
- struct utsname *p_uname;
t_chip *chip;
g_assert (chips!=NULL);
@@ -526,6 +530,7 @@ get_hddtemp_value (char* disk, gboolean *suppressmessage)
gchar *tmp, *tmp2, *tmp3;
char reply[REPLY_MAX_SIZE];
//size_t read_size;
+ int resultHddtemp;
#endif
if (disk==NULL)
@@ -548,7 +553,11 @@ get_hddtemp_value (char* disk, gboolean *suppressmessage)
if (exit_status==0)
*/
bzero(&reply, REPLY_MAX_SIZE);
- get_hddtemp_d_str(reply, REPLY_MAX_SIZE);
+ resultHddtemp = get_hddtemp_d_str(reply, REPLY_MAX_SIZE);
+ if (resultHddtemp==-1)
+ {
+ return 0.0;
+ }
{
tmp3 = "-255";
@@ -723,4 +732,3 @@ refresh_hddtemp (gpointer chip_feature, gpointer data)
TRACE ("leaves refresh_hddtemp");
}
-
diff --git a/ltmain.sh b/ltmain.sh
index c7d06c3..bb5fa02 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -70,7 +70,7 @@
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1
+# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7
# automake: $automake_version
# autoconf: $autoconf_version
#
@@ -80,7 +80,7 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION="2.4.2 Debian-2.4.2-1"
+VERSION="2.4.2 Debian-2.4.2-1.7"
TIMESTAMP=""
package_revision=1.3337
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list