Merge with changes from gkrellm-2.3.5-pre.tar.bz2

This commit is contained in:
Stefan Gehn 2010-09-15 15:32:14 +00:00
parent 1cce0cd3c9
commit d72d689c4c
90 changed files with 4669 additions and 4416 deletions

View File

@ -1,8 +1,10 @@
The code in the GKrellM distribution is Copyright (C) 1999-2007 by Bill Wilson The code in the GKrellM distribution is Copyright (C) 1999-2010 by Bill Wilson
except for: except for:
base64.c which is Copyright 1997 by Eric S. Raymond and is under the GPL. base64.c which is Copyright 1997 by Eric S. Raymond and is under the GPL,
and and
md5.h, md5c.c which are public domain. md5.h, md5c.c which are public domain,
and and
some system dependent files which port GKrellM to architectures other some system dependent files which port GKrellM to architectures other
than Linux are Copyright their authors as indicated in the respective files. than Linux are Copyright their authors as indicated in the respective files,
and
any other file which has its own copyright posted.

View File

@ -1,5 +1,42 @@
GKrellM Changelog GKrellM Changelog
----------------- -----------------
2.3.5 - Not released
------------------------
* Patch from Stefan Gehn:
- Clean up debug printing by using gkrellm_debug(), g_message(),
g_debug(), g_warning().
- Replace sprintf() calls with snprintf().
- Use glib gstdio to replace unix calls: fopen()->g_fopen(), etc.
- Use glib mutex functions for portability.
- Fix IMAP login by escaping backslash and double-quotes in
username, password and mailbox strings.
- Fix initial sending of fstab entries in gkrellmd, fstab was only
sent if it was marked as "changed"
- Configure scripts handle pkg-config and compiler errors better.
- src/Makefile: Rename SMC_LIBS to X11_lIBS and add -lX11
- Makefile: Drop duplicating SMC_LIBS in "netbsd" targets by calling
src/Makefile with "netbsd" target instead of using the generic
"gkrellm" target.
- Make "-d" commandline option the short version for "--detach"
instead of for "--debug-level".
- Enable IPv6-support on win32 if target os is windows xp or newer.
- Support monitoring of active IPv6 TCP connections on windows vista
or newer.
- Fix building with mingw-w64 environment.
* Patch from Stefan Gehn: add searching for linux sensors directly below
hwmon dir since kernel is putting newer devices there.
* Patch from Hajimu Umemoto: FreeBSD memory usage calculation update.
* Translation updates
o es.po from Cristian Othon Martinez Vera
o de.po minor bug patch from Jan Brinkmann.
o pt_BR.po update from Vinicius Moreira de Oliveira
* Bugfixes
o Fix eof check in fgets_pipe() (when using external mail check program).
o Jindrich Makovicka patch: fix some aliasing violations due to
sockaddr_* typecasting.
o Ville Skytta patch: add explicit -lm linking to fix Fedora builds
with --no-add-needed.
2.3.4 - Mon Jan 4, 2010 2.3.4 - Mon Jan 4, 2010
------------------------ ------------------------
* Add gkrellm_sys_setup_connect() function so sysdep code can register * Add gkrellm_sys_setup_connect() function so sysdep code can register

View File

@ -5,7 +5,7 @@
<h3>Changelog for GKrellM Plugins</h3> <h3>Changelog for GKrellM Plugins</h3>
<hr size="4"> <hr size="4">
<h4>Changes for versions 2.3.1 - 2.3.4</h4> <h4>Changes for versions 2.3.1 - 2.3.5</h4>
none none
<h4>Changes for version 2.3.0</h4> <h4>Changes for version 2.3.0</h4>

View File

@ -10,7 +10,7 @@
<pre> <pre>
Changes in 2.2.3 - 2.3.4 Changes in 2.2.3 - 2.3.5
------------------------ ------------------------
None None

View File

@ -81,11 +81,14 @@ Note: install_solaris makes gkrellm setgid sys so it can be run non-root, ie:
(see below for additional Solaris install notes) (see below for additional Solaris install notes)
Windows 2000/XP (Vista is untested) Windows: 2000 SP4 / XP SP1 / Vista SP2
----------------------------- ---------------------------------------
make windows make windows
make INSTALLROOT=C:\gkrellm install_windows make INSTALLROOT=C:\gkrellm install_windows
See:
http://www.srcbox.net/projects/gkrellm/
Needed software for building gkrellm on win32 systems: Needed software for building gkrellm on win32 systems:
- MinGW - MinGW
- MSYS (gkrellm Makefiles are NOT compatible with cmd.exe) - MSYS (gkrellm Makefiles are NOT compatible with cmd.exe)

View File

@ -87,7 +87,7 @@ BINMODE = 755
#GTOP_LIBS_D = -L$(GTOP_PREFIX)/lib -lgtop -lgtop_common -lgtop_sysdeps #GTOP_LIBS_D = -L$(GTOP_PREFIX)/lib -lgtop -lgtop_common -lgtop_sysdeps
#export GTOP_INCLUDE GTOP_LIBS GTOP_LIBS_D #export GTOP_INCLUDE GTOP_LIBS GTOP_LIBS_D
VERSION = 2.3.4 VERSION = 2.3.5
INSTALLROOT ?= $(DESTDIR)$(PREFIX) INSTALLROOT ?= $(DESTDIR)$(PREFIX)

3
README
View File

@ -5,10 +5,11 @@ Author: Bill Wilson
Email: billw--at--gkrellm.net Email: billw--at--gkrellm.net
Homepage: http://gkrellm.net Homepage: http://gkrellm.net
Copyright (c) 1999-2009 by Bill Wilson. This program is free software Copyright (c) 1999-2010 by Bill Wilson. This program is free software
which I release under the GNU General Public License. which I release under the GNU General Public License.
Read the COPYRIGHT file for more info. Read the COPYRIGHT file for more info.
CREDITS: See the CREDITS file.
Description Description
=========== ===========

View File

@ -1,4 +1,4 @@
.TH gkrellm 1 "Dec 21, 2009" "GNU/Linux" "User's Manual" .TH gkrellm 1 "Sep 15, 2010" "GNU/Linux" "User's Manual"
.SH "NAME" .SH "NAME"
gkrellm \- The GNU Krell Monitors gkrellm \- The GNU Krell Monitors
@ -1234,7 +1234,7 @@ System wide theme packaged as part of a system wide Gtk theme.
.SH "AUTHORS" .SH "AUTHORS"
Bill Wilson <billw@gkrellm.net>. This manual page was written by Bill Wilson <billw@gkrellm.net>.
http://www.gkrellm.net/ http://www.gkrellm.net/
.SH "SEE ALSO" .SH "SEE ALSO"

View File

@ -1,5 +1,5 @@
%define name gkrellm %define name gkrellm
%define version 2.3.4 %define version 2.3.5
%define release 1 %define release 1
%define prefix /usr %define prefix /usr

View File

@ -1,4 +1,4 @@
.TH gkrellmd 1 "Dec 21, 2009" "GNU/Linux" "User's Manual" .TH gkrellmd 1 "Sep 15, 2010" "GNU/Linux" "User's Manual"
.SH "NAME" .SH "NAME"
gkrellmd \- The GNU Krell Monitors Server gkrellmd \- The GNU Krell Monitors Server
@ -434,5 +434,5 @@ Local server plugin directory.
.SH "AUTHOR" .SH "AUTHOR"
Bill Wilson <billw@gkrellm.net>. This manual page was written by Bill Wilson <billw@gkrellm.net>.
http://www.gkrellm.net/ http://www.gkrellm.net/

553
po/bg.po

File diff suppressed because it is too large Load Diff

553
po/cs.po

File diff suppressed because it is too large Load Diff

553
po/da.po

File diff suppressed because it is too large Load Diff

567
po/de.po

File diff suppressed because it is too large Load Diff

773
po/es.po

File diff suppressed because it is too large Load Diff

565
po/fr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

553
po/it.po

File diff suppressed because it is too large Load Diff

555
po/ja.po

File diff suppressed because it is too large Load Diff

553
po/nl.po

File diff suppressed because it is too large Load Diff

565
po/pl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

553
po/ru.po

File diff suppressed because it is too large Load Diff

557
po/sl.po

File diff suppressed because it is too large Load Diff

557
po/sv.po

File diff suppressed because it is too large Load Diff

View File

@ -246,7 +246,7 @@ sysdeps-unix.o: sysdeps-unix.c ../src/gkrellm-sysdeps.h $(SYSDEPS) $(GKRELLMD_H)
log.o: $(SHARED_PATH)/log.c $(SHARED_PATH)/log.h $(GKRELLMD_H) log.o: $(SHARED_PATH)/log.c $(SHARED_PATH)/log.h $(GKRELLMD_H)
win32-gui.o: win32-gui.c win32-gui.o: win32-gui.c
win32-plugin.o: win32-plugin.c win32-plugin.h $(GKRELLMD_H) win32-plugin.o: win32-plugin.c win32-plugin.h $(GKRELLMD_H)
win32-resource.o: win32-resource.rc win32-resource.h win32-resource.o: win32-resource.rc win32-resource.h
$(WINDRES) $< -o $@ $(WINDRES) $< -o $@
win32-libgkrellmd.o: win32-libgkrellmd.c win32-plugin.h $(GKRELLMD_H) win32-libgkrellmd.o: win32-libgkrellmd.c win32-plugin.h $(GKRELLMD_H)
libgkrellmd.a: win32-libgkrellmd.o libgkrellmd.a: win32-libgkrellmd.o

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -108,7 +108,7 @@
*/ */
#define GKRELLMD_VERSION_MAJOR 2 #define GKRELLMD_VERSION_MAJOR 2
#define GKRELLMD_VERSION_MINOR 3 #define GKRELLMD_VERSION_MINOR 3
#define GKRELLMD_VERSION_REV 4 #define GKRELLMD_VERSION_REV 5
#define GKRELLMD_EXTRAVERSION "" #define GKRELLMD_EXTRAVERSION ""
#define GKRELLMD_CHECK_VERSION(major,minor,rev) \ #define GKRELLMD_CHECK_VERSION(major,minor,rev) \

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -340,7 +340,12 @@ cidr_match(struct sockaddr *sa, socklen_t salen, char *allowed)
{ {
#ifdef HAVE_GETADDRINFO #ifdef HAVE_GETADDRINFO
struct addrinfo hints, *res; struct addrinfo hints, *res;
struct sockaddr_storage ss; union {
struct sockaddr_storage ss;
struct sockaddr_in sin;
struct sockaddr_in6 sin6;
struct sockaddr sa;
} ss;
char *buf; char *buf;
char *p, *ep; char *p, *ep;
guchar *addr, *pat; guchar *addr, *pat;
@ -376,7 +381,7 @@ cidr_match(struct sockaddr *sa, socklen_t salen, char *allowed)
memcpy(&ss, res->ai_addr, res->ai_addrlen); memcpy(&ss, res->ai_addr, res->ai_addrlen);
freeaddrinfo(res); freeaddrinfo(res);
if (sa->sa_family != ((struct sockaddr *)&ss)->sa_family) if (sa->sa_family != ss.sa.sa_family)
return FALSE; return FALSE;
switch (sa->sa_family) switch (sa->sa_family)
{ {
@ -386,12 +391,12 @@ cidr_match(struct sockaddr *sa, socklen_t salen, char *allowed)
plen = 128; plen = 128;
if (plen > 128) if (plen > 128)
return FALSE; return FALSE;
if (((struct sockaddr_in6 *)&ss)->sin6_scope_id != 0 && if (ss.sin6.sin6_scope_id != 0 &&
((struct sockaddr_in6 *)&ss)->sin6_scope_id != ss.sin6.sin6_scope_id !=
((struct sockaddr_in6 *)sa)->sin6_scope_id) ((struct sockaddr_in6 *)sa)->sin6_scope_id)
return FALSE; return FALSE;
addr = (guchar *)&((struct sockaddr_in6 *)sa)->sin6_addr; addr = (guchar *)&((struct sockaddr_in6 *)sa)->sin6_addr;
pat = (guchar *)&((struct sockaddr_in6 *)&ss)->sin6_addr; pat = (guchar *)&ss.sin6.sin6_addr;
i = 0; i = 0;
while (plen > 0) while (plen > 0)
{ {
@ -417,7 +422,7 @@ cidr_match(struct sockaddr *sa, socklen_t salen, char *allowed)
if (plen > 32) if (plen > 32)
return FALSE; return FALSE;
addr = (guchar *)&((struct sockaddr_in *)sa)->sin_addr; addr = (guchar *)&((struct sockaddr_in *)sa)->sin_addr;
pat = (guchar *)&((struct sockaddr_in *)&ss)->sin_addr; pat = (guchar *)&ss.sin.sin_addr;
mask = htonl(~(0xffffffff >> plen)); mask = htonl(~(0xffffffff >> plen));
if ((*(uint32_t *)addr & mask) != if ((*(uint32_t *)addr & mask) !=
(*(uint32_t *)pat & mask)) (*(uint32_t *)pat & mask))
@ -1022,7 +1027,7 @@ socksetup(int af)
#if defined(WIN32) #if defined(WIN32)
closesocket(*s); closesocket(*s);
#else #else
close(*s); close(*s);
#endif #endif
continue; continue;
} }
@ -1127,11 +1132,15 @@ drop_privileges(void)
static gint static gint
gkrellmd_run(gint argc, gchar **argv) gkrellmd_run(gint argc, gchar **argv)
{ {
union {
#ifdef HAVE_GETADDRINFO #ifdef HAVE_GETADDRINFO
struct sockaddr_storage client_addr; struct sockaddr_storage ss;
#else #else
struct sockaddr_in client_addr; struct sockaddr_in ss;
#endif #endif
struct sockaddr_in sin;
struct sockaddr sa;
} client_addr;
fd_set read_fds, test_fds; fd_set read_fds, test_fds;
struct timeval tv; struct timeval tv;
GkrellmdClient *client; GkrellmdClient *client;
@ -1218,7 +1227,7 @@ gkrellmd_run(gint argc, gchar **argv)
#if defined(WIN32) #if defined(WIN32)
closesocket(_GK.server_fd[i]); closesocket(_GK.server_fd[i]);
#else #else
close(_GK.server_fd[i]); close(_GK.server_fd[i]);
#endif #endif
continue; continue;
} }
@ -1249,11 +1258,7 @@ gkrellmd_run(gint argc, gchar **argv)
#endif #endif
{ {
test_fds = read_fds; test_fds = read_fds;
#ifdef HAVE_GETADDRINFO addr_len = sizeof(client_addr.ss);
addr_len = sizeof(struct sockaddr_storage);
#else
addr_len = sizeof(struct sockaddr_in);
#endif
tv.tv_usec = interval; tv.tv_usec = interval;
tv.tv_sec = 0; tv.tv_sec = 0;
@ -1292,7 +1297,7 @@ gkrellmd_run(gint argc, gchar **argv)
{ {
gkrellm_debug(DEBUG_SERVER, "Calling accept() for new client connection\n"); gkrellm_debug(DEBUG_SERVER, "Calling accept() for new client connection\n");
client_fd = accept(server_fd, client_fd = accept(server_fd,
(struct sockaddr *) &client_addr, &client_addr.sa,
(socklen_t *) (void *)&addr_len); (socklen_t *) (void *)&addr_len);
if (client_fd == -1) if (client_fd == -1)
{ {
@ -1304,13 +1309,13 @@ gkrellmd_run(gint argc, gchar **argv)
if (client_fd > max_fd) if (client_fd > max_fd)
max_fd = client_fd; max_fd = client_fd;
client = accept_client(client_fd, client = accept_client(client_fd,
(struct sockaddr *)&client_addr, addr_len); &client_addr.sa, addr_len);
if (!client) if (!client)
{ {
#if defined(WIN32) #if defined(WIN32)
closesocket(client_fd); closesocket(client_fd);
#else #else
close(client_fd); close(client_fd);
#endif #endif
continue; continue;
} }
@ -1319,7 +1324,7 @@ gkrellmd_run(gint argc, gchar **argv)
g_message(_("Accepted client %s:%u\n"), g_message(_("Accepted client %s:%u\n"),
client->hostname, client->hostname,
ntohs(((struct sockaddr_in *)&client_addr)->sin_port)); ntohs(client_addr.sin.sin_port));
} }
else else
{ {
@ -1653,15 +1658,15 @@ int main(int argc, char* argv[])
// Prepend app install path to locale dir // Prepend app install path to locale dir
install_path = g_win32_get_package_installation_directory_of_module(NULL); install_path = g_win32_get_package_installation_directory_of_module(NULL);
if (install_path != NULL) if (install_path != NULL)
{
locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
if (locale_dir != NULL)
{ {
bindtextdomain(PACKAGE_D, locale_dir); locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
g_free(locale_dir); if (locale_dir != NULL)
} {
bindtextdomain(PACKAGE_D, locale_dir);
g_free(locale_dir);
}
g_free(install_path); g_free(install_path);
} }
#else #else
bindtextdomain(PACKAGE_D, LOCALEDIR); bindtextdomain(PACKAGE_D, LOCALEDIR);
#endif /* !WIN32 */ #endif /* !WIN32 */

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,6 +1,6 @@
/* GKrellM Windows Portion /* GKrellM Windows Portion
| Copyright (C) 2002 Bill Nalen | Copyright (C) 2002 Bill Nalen
| 2007-2009 Stefan Gehn | 2007-2010 Stefan Gehn
| |
| Authors: Bill Nalen bill@nalens.com | Authors: Bill Nalen bill@nalens.com
| Stefan Gehn stefan+gkrellm@srcbox.net | Stefan Gehn stefan+gkrellm@srcbox.net

View File

@ -1,5 +1,5 @@
/* GKrellM Windows Portion /* GKrellM Windows Portion
| Copyright (C) 2006-2009 Stefan Gehn | Copyright (C) 2006-2010 Stefan Gehn
| |
| Authors: Stefan Gehn stefan+gkrellm@srcbox.net | Authors: Stefan Gehn stefan+gkrellm@srcbox.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,9 +1,8 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| 2007-2009 Stefan Gehn | 2007-2010 Stefan Gehn
| |
| Authors: Bill Wilson billw@gkrellm.net | Author: Stefan Gehn stefan+gkrellm@srcbox.net
| Stefan Gehn stefan+gkrellm@srcbox.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
| |
| |

View File

@ -1,7 +1,7 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Stefan Gehn stefan+gkrellm@srcbox.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
| |
| |

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Stefan Gehn stefan+gkrellm@srcbox.net | Author: Stefan Gehn stefan+gkrellm@srcbox.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,8 +1,7 @@
/* GKrellM /* GKrellM
* Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
* |
* @author Bill Wilson <billw@gkrellm.net> | Author: Stefan Gehn stefan+gkrellm@srcbox.net
*
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
| |
| |

View File

@ -21,6 +21,7 @@ MANDIRMODE ?= 755
INSTALL ?= install INSTALL ?= install
LINK_FLAGS ?= -Wl,-E LINK_FLAGS ?= -Wl,-E
X11_LIBS ?= -L/usr/X11R6/lib -lX11 -lSM -lICE X11_LIBS ?= -L/usr/X11R6/lib -lX11 -lSM -lICE
MATH_LIB ?= -lm
SHARED_PATH = ../shared SHARED_PATH = ../shared
# Make GNU Make search for sources somewhere else as well # Make GNU Make search for sources somewhere else as well
@ -58,7 +59,7 @@ include configure.mk
# Only use own md5-code if neither OpenSSL nor GnuTLS are present # Only use own md5-code if neither OpenSSL nor GnuTLS are present
ifneq ($(HAVE_SSL),1) ifneq ($(HAVE_SSL),1)
EXTRAOBJS ?= md5c.o EXTRAOBJS ?= md5c.o
endif endif
CC ?= gcc CC ?= gcc
@ -74,7 +75,7 @@ FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\
${SSL_INCLUDE} ${NTLM_INCLUDE} -DGKRELLM_CLIENT ${SSL_INCLUDE} ${NTLM_INCLUDE} -DGKRELLM_CLIENT
LIBS = $(PKG_LIB) $(GTOP_LIBS) $(X11_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS)\ LIBS = $(PKG_LIB) $(GTOP_LIBS) $(X11_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS)\
$(NTLM_LIBS) $(NTLM_LIBS) $(MATH_LIB)
ifeq ($(debug),1) ifeq ($(debug),1)
FLAGS += -g FLAGS += -g

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -1918,6 +1918,7 @@ gkrellm_client_mode_connect(void)
(GdkInputFunction) read_server_input, NULL); (GdkInputFunction) read_server_input, NULL);
server_alive = TRUE; server_alive = TRUE;
return GOOD_CONNECT; return GOOD_CONNECT;
} }

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -108,7 +108,7 @@
*/ */
#define GKRELLM_VERSION_MAJOR 2 #define GKRELLM_VERSION_MAJOR 2
#define GKRELLM_VERSION_MINOR 3 #define GKRELLM_VERSION_MINOR 3
#define GKRELLM_VERSION_REV 4 #define GKRELLM_VERSION_REV 5
#define GKRELLM_EXTRAVERSION "" #define GKRELLM_EXTRAVERSION ""
#define GKRELLM_CHECK_VERSION(major,minor,rev) \ #define GKRELLM_CHECK_VERSION(major,minor,rev) \

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -768,7 +768,7 @@ create_about_tab(GtkWidget *vbox)
gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
buf = g_strdup_printf(_("GKrellM %d.%d.%d%s\nGNU Krell Monitors\n\n" buf = g_strdup_printf(_("GKrellM %d.%d.%d%s\nGNU Krell Monitors\n\n"
"Copyright (c) 1999-2009 by Bill Wilson\n" "Copyright (c) 1999-2010 by Bill Wilson\n"
"billw@gkrellm.net\n" "billw@gkrellm.net\n"
"http://gkrellm.net\n\n" "http://gkrellm.net\n\n"
"Released under the GNU General Public License"), "Released under the GNU General Public License"),
@ -2195,7 +2195,7 @@ gkrellm_remove_plugin_config_page(GkrellmMonitor *mon)
continue; continue;
tmon->privat->config_page -= 1; tmon->privat->config_page -= 1;
gkrellm_debug(DEBUG_GUI, "config_page %d: %s\n", gkrellm_debug(DEBUG_GUI, "config_page %d: %s\n",
tmon->privat->config_page, tmon->name); tmon->privat->config_page, tmon->name);
} }
} }
mon->privat->config_page = -1; mon->privat->config_page = -1;
@ -2259,7 +2259,7 @@ cb_tree_selection_changed(GtkTreeSelection *selection, gpointer data)
gtk_notebook_set_current_page(config_notebook, page); gtk_notebook_set_current_page(config_notebook, page);
gkrellm_debug(DEBUG_GUI, "tree_selection_changed %d: %s\n", gkrellm_debug(DEBUG_GUI, "tree_selection_changed %d: %s\n",
page, selected_monitor ? selected_monitor->name : "--"); page, selected_monitor ? selected_monitor->name : "--");
} }
/* Monitors may want to present as instant apply monitors, but still need /* Monitors may want to present as instant apply monitors, but still need

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -650,9 +650,12 @@ get_connection_string_thread(void *data)
GList *list; GList *list;
ActiveTCP *tcp; ActiveTCP *tcp;
#if defined(INET6) #if defined(INET6)
struct sockaddr_storage ss; union {
struct sockaddr_in *sin; struct sockaddr_storage ss;
struct sockaddr_in6 *sin6; struct sockaddr_in sin;
struct sockaddr_in6 sin6;
struct sockaddr sa;
} ss;
gint salen, flag = 0; gint salen, flag = 0;
gchar hbuf[NI_MAXHOST]; gchar hbuf[NI_MAXHOST];
gchar buf[NI_MAXHOST + 10]; gchar buf[NI_MAXHOST + 10];
@ -670,34 +673,32 @@ get_connection_string_thread(void *data)
{ {
tcp = (ActiveTCP *) list->data; tcp = (ActiveTCP *) list->data;
#if defined(INET6) #if defined(INET6)
memset(&ss, 0, sizeof(ss)); memset(&ss.ss, 0, sizeof(ss.ss));
switch (tcp->family) switch (tcp->family)
{ {
case AF_INET: case AF_INET:
sin = (struct sockaddr_in *)&ss;
salen = sizeof(struct sockaddr_in); salen = sizeof(struct sockaddr_in);
memcpy(&sin->sin_addr, &tcp->remote_addr, salen); memcpy(&ss.sin.sin_addr, &tcp->remote_addr, salen);
#if defined(SIN6_LEN) #if defined(SIN6_LEN)
sin->sin_len = salen; ss.sin.sin_len = salen;
#endif #endif
sin->sin_family = tcp->family; ss.sin.sin_family = tcp->family;
break; break;
case AF_INET6: case AF_INET6:
sin6 = (struct sockaddr_in6 *)&ss;
salen = sizeof(struct sockaddr_in6); salen = sizeof(struct sockaddr_in6);
memcpy(&sin6->sin6_addr, &tcp->remote_addr6, salen); memcpy(&ss.sin6.sin6_addr, &tcp->remote_addr6, salen);
#if defined(SIN6_LEN) #if defined(SIN6_LEN)
sin6->sin6_len = salen; ss.sin6.sin6_len = salen;
#endif #endif
sin6->sin6_family = tcp->family; ss.sin6.sin6_family = tcp->family;
/* XXX: We should mention about /* XXX: We should mention about
| scope, too. */ | scope, too. */
break; break;
default: default:
continue; continue;
} }
if (getnameinfo((struct sockaddr *)&ss, salen, if (getnameinfo(&ss.sa, salen,
hbuf, sizeof(hbuf), NULL, 0, flag)) hbuf, sizeof(hbuf), NULL, 0, flag))
continue; continue;
remote_host = hbuf; remote_host = hbuf;
#else #else

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -1998,7 +1998,7 @@ fgets_pipe(gchar *line, gint len, Mailproc *mp)
#endif #endif
if (n <= 0) if (n <= 0)
{ {
if (errno != EINTR && errno != EAGAIN) if ((n == 0) || (errno != EINTR && errno != EAGAIN))
{ {
if (close(mp->pipe) < 0 && errno == EINTR) if (close(mp->pipe) < 0 && errno == EINTR)
close(mp->pipe); close(mp->pipe);
@ -2312,8 +2312,8 @@ mail_check_thread(void *data)
format_remote_mbox_name(mbox, buf, sizeof(buf)); format_remote_mbox_name(mbox, buf, sizeof(buf));
g_debug("Start mail_check_thread: %s at %d:%d:%d\n", buf, g_debug("Start mail_check_thread: %s at %d:%d:%d\n", buf,
gkrellm_get_current_time()->tm_hour, gkrellm_get_current_time()->tm_hour,
gkrellm_get_current_time()->tm_min, gkrellm_get_current_time()->tm_min,
gkrellm_get_current_time()->tm_sec); gkrellm_get_current_time()->tm_sec);
} }
external = mbox->account->mboxtype & MBOX_EXTERNAL; external = mbox->account->mboxtype & MBOX_EXTERNAL;
if ( (*(mbox->check_func))(external ? mbox->data : mbox) == FALSE) if ( (*(mbox->check_func))(external ? mbox->data : mbox) == FALSE)
@ -2327,8 +2327,8 @@ mail_check_thread(void *data)
gkrellm_debug(DEBUG_MAIL, "Stop mail_check_thread: %s at %d:%d:%d\n", buf, gkrellm_debug(DEBUG_MAIL, "Stop mail_check_thread: %s at %d:%d:%d\n", buf,
gkrellm_get_current_time()->tm_hour, gkrellm_get_current_time()->tm_hour,
gkrellm_get_current_time()->tm_min, gkrellm_get_current_time()->tm_min,
gkrellm_get_current_time()->tm_sec); gkrellm_get_current_time()->tm_sec);
mbox->busy = FALSE; mbox->busy = FALSE;
mbox->thread = NULL; mbox->thread = NULL;

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -2104,15 +2104,15 @@ main(gint argc, gchar **argv)
// Prepend app install path to locale dir // Prepend app install path to locale dir
install_path = g_win32_get_package_installation_directory_of_module(NULL); install_path = g_win32_get_package_installation_directory_of_module(NULL);
if (install_path != NULL) if (install_path != NULL)
{
locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
if (locale_dir != NULL)
{ {
bindtextdomain(PACKAGE, locale_dir); locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
g_free(locale_dir); if (locale_dir != NULL)
} {
bindtextdomain(PACKAGE, locale_dir);
g_free(locale_dir);
}
g_free(install_path); g_free(install_path);
} }
#else #else
bindtextdomain(PACKAGE, LOCALEDIR); bindtextdomain(PACKAGE, LOCALEDIR);
#endif /* !WIN32 */ #endif /* !WIN32 */

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -531,7 +531,7 @@ sensor_read_temperature(Sensor *sensor, gfloat *temp, gchar *units)
} }
if (sensor) if (sensor)
gkrellm_debug(DEBUG_SENSORS, "sensor_temp: %s %s t=%.2f\n", gkrellm_debug(DEBUG_SENSORS, "sensor_temp: %s %s t=%.2f\n",
sensor->name_locale, sensor->path, sensor->value); sensor->name_locale, sensor->path, sensor->value);
if (found_temp && sensor) if (found_temp && sensor)
gkrellm_check_alert(sensor->alert, sensor->value); gkrellm_check_alert(sensor->alert, sensor->value);
return found_temp; return found_temp;
@ -567,7 +567,7 @@ sensor_read_fan(Sensor *sensor, gfloat *fan)
*fan = f; *fan = f;
if (sensor) if (sensor)
gkrellm_debug(DEBUG_SENSORS, "sensor_fan: %s %s rpm=%.0f\n", gkrellm_debug(DEBUG_SENSORS, "sensor_fan: %s %s rpm=%.0f\n",
sensor->name_locale, sensor->path, sensor->value); sensor->name_locale, sensor->path, sensor->value);
if (found_fan && sensor) if (found_fan && sensor)
gkrellm_check_alert(sensor->alert, sensor->value); gkrellm_check_alert(sensor->alert, sensor->value);
return found_fan; return found_fan;
@ -607,7 +607,7 @@ sensor_read_voltage(Sensor *sensor, gfloat *voltage)
*voltage = v; *voltage = v;
if (sensor) if (sensor)
gkrellm_debug(DEBUG_SENSORS, "sensor_voltage: %s %s v=%.2f\n", gkrellm_debug(DEBUG_SENSORS, "sensor_voltage: %s %s v=%.2f\n",
sensor->name_locale, sensor->path, sensor->value); sensor->name_locale, sensor->path, sensor->value);
if (found_voltage && sensor) if (found_voltage && sensor)
gkrellm_check_alert(sensor->alert, sensor->value); gkrellm_check_alert(sensor->alert, sensor->value);
return found_voltage; return found_voltage;

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2007 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2007 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2007 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2007 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -1041,13 +1041,14 @@ gkrellm_sys_mem_read_data(void)
static gint swappgsin = -1; static gint swappgsin = -1;
static gint swappgsout = -1; static gint swappgsout = -1;
gint dpagein, dpageout; gint dpagein, dpageout;
guint64 total, used, x_used, free, shared, buffers = 0, cached; guint64 total, used, free, shared, buffers = 0, cached;
struct vmtotal vmt; struct vmtotal vmt;
size_t length_vmt = sizeof(vmt); size_t length_vmt = sizeof(vmt);
static int oid_vmt[] = { CTL_VM, VM_TOTAL }; static int oid_vmt[] = { CTL_VM, VM_TOTAL };
#if __FreeBSD_version >= 410000 #if __FreeBSD_version >= 410000
gint i; gint i;
#else #else
guint64 x_used;
struct vmmeter sum; struct vmmeter sum;
#endif #endif
@ -1083,16 +1084,14 @@ gkrellm_sys_mem_read_data(void)
if (sysctl(mibs[i].oid, mibs[i].oid_len, &mibs[i].value, if (sysctl(mibs[i].oid, mibs[i].oid_len, &mibs[i].value,
&mibs[i].value_len, NULL, 0) < 0) &mibs[i].value_len, NULL, 0) < 0)
return; return;
total = (mibs[MIB_V_PAGE_COUNT].value - total = (guint64)(mibs[MIB_V_PAGE_COUNT].value) << pshift;
mibs[MIB_V_WIRE_COUNT].value) << pshift; free = (guint64)(mibs[MIB_V_INACTIVE_COUNT].value +
x_used = (mibs[MIB_V_ACTIVE_COUNT].value + mibs[MIB_V_FREE_COUNT].value) << pshift;
mibs[MIB_V_INACTIVE_COUNT].value) << pshift;
free = mibs[MIB_V_FREE_COUNT].value << pshift;
if (sysctl(oid_vmt, 2, &vmt, &length_vmt, NULL, 0) == 0) if (sysctl(oid_vmt, 2, &vmt, &length_vmt, NULL, 0) == 0)
shared = vmt.t_rmshr << pshift; shared = (guint64)vmt.t_rmshr << pshift;
get_bufspace(&buffers); get_bufspace(&buffers);
cached = mibs[MIB_V_CACHE_COUNT].value << pshift; cached = (guint64)mibs[MIB_V_CACHE_COUNT].value << pshift;
used = x_used - buffers - cached; used = total - free;
gkrellm_mem_assign_data(total, used, free, shared, buffers, cached); gkrellm_mem_assign_data(total, used, free, shared, buffers, cached);
if (swappgsin < 0) if (swappgsin < 0)

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -3040,10 +3040,11 @@ gkrellm_sys_sensors_get_temperature(gchar *sensor_path, gint id,
#if GLIB_CHECK_VERSION(2,0,0) #if GLIB_CHECK_VERSION(2,0,0)
gchar *args[] = { "nvidia-settings", "-q", sensor_path, NULL }; gchar *args[] = { "nvidia-settings", "-q", sensor_path, NULL };
gchar *output = NULL; gchar *output = NULL;
GError *error = NULL;
result = g_spawn_sync(NULL, args, NULL, result = g_spawn_sync(NULL, args, NULL,
G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL, &output, NULL, NULL, NULL); NULL, NULL, &output, NULL, NULL, &error);
if(result && output) if(result && output)
{ {
@ -3051,10 +3052,21 @@ gkrellm_sys_sensors_get_temperature(gchar *sensor_path, gint id,
if(!temp) if(!temp)
temp = &dummy; temp = &dummy;
result = (sscanf(output, " Attribute %*s %*s %f", temp) == 1); result = (sscanf((*output == '\n' ? output + 1 : output),
" Attribute %*s %*s %f", temp) == 1);
} }
if ((_GK.debug_level & DEBUG_SENSORS) && (!result || !output))
g_free(output); {
printf("nvidia-settings %s: result=%d output=%s\n", sensor_path,
(gint) result,
output ? output : "(null)");
if (error)
printf("\terror=%s\n", error->message);
}
if (error)
g_error_free(error);
if (output)
g_free(output);
return result; return result;
#else #else
return FALSE; return FALSE;
@ -3403,7 +3415,18 @@ sysfs_sensors_init(void)
if ((chip_name = sysfs_get_chip_name(path)) == NULL) if ((chip_name = sysfs_get_chip_name(path)) == NULL)
{ {
g_dir_close(chip_dir); g_dir_close(chip_dir);
continue; if (using_i2c_dir)
continue;
/* Newer hwmon drivers keep their files directly in the hwmon dir
and not in the device-subdir. */
snprintf(path, sizeof(path), "%s/%s", SYSFS_HWMON_DIR, bus_name);
if ((chip_dir = g_dir_open(path, 0, NULL)) == NULL)
continue;
if ((chip_name = sysfs_get_chip_name(path)) == NULL)
{
g_dir_close(chip_dir);
continue;
}
} }
have_sysfs_sensors = TRUE; have_sysfs_sensors = TRUE;
if (_GK.debug_level & DEBUG_SENSORS) if (_GK.debug_level & DEBUG_SENSORS)
@ -3495,15 +3518,33 @@ sensors_nvidia_settings_ngpus(void)
#if GLIB_CHECK_VERSION(2,0,0) #if GLIB_CHECK_VERSION(2,0,0)
gchar *args[] = { "nvidia-settings", "-q", "gpus", NULL }; gchar *args[] = { "nvidia-settings", "-q", "gpus", NULL };
gchar *output = NULL; gchar *output = NULL;
gchar *errout = NULL;
gboolean result; gboolean result;
GError *error = NULL;
result = g_spawn_sync(NULL, args, NULL, result = g_spawn_sync(NULL, args, NULL,
G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL, G_SPAWN_SEARCH_PATH,
NULL, NULL, &output, NULL, NULL, NULL); NULL, NULL, &output, &errout, NULL, &error);
if (_GK.debug_level & DEBUG_SENSORS)
{
printf("nvidia-settings: result=%d output=%s stderr=%s\n",
(gint) result,
output ? output : "(null)",
errout ? errout : "(null)");
if (error)
printf("\terror=%s\n", error->message);
}
if(result && output) if(result && output)
sscanf(output, "%d", &n); sscanf((*output == '\n' ? output + 1 : output), "%d", &n);
g_free(output);
if (output)
g_free(output);
if (errout)
g_free(errout);
if (error)
g_error_free(error);
#endif #endif
if (_GK.debug_level & DEBUG_SENSORS) if (_GK.debug_level & DEBUG_SENSORS)
g_debug("nvidia-settings gpus = %d\n", n); g_debug("nvidia-settings gpus = %d\n", n);

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2007 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2007 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net
@ -32,6 +32,7 @@
*/ */
/* A system dependent interface can include this file to get sensors /* A system dependent interface can include this file to get sensors
| from daemons that can run under different operating systems. | from daemons that can run under different operating systems.
*/ */
@ -85,7 +86,7 @@ mbmon_decimal_point_check(gchar *buf)
{ {
mbmon_need_decimal_point_fix = TRUE; mbmon_need_decimal_point_fix = TRUE;
gkrellm_debug(DEBUG_SENSORS, "mbmon_need_decimal_point_fix: %c -> %c\n", gkrellm_debug(DEBUG_SENSORS, "mbmon_need_decimal_point_fix: %c -> %c\n",
mbmon_decimal_point, gkrellm_decimal_point); mbmon_decimal_point, gkrellm_decimal_point);
} }
g_free(s); g_free(s);
@ -332,7 +333,7 @@ hddtemp_daemon_read(void)
close(fd); close(fd);
gkrellm_debug(DEBUG_SENSORS, "hddtemp_daemon_read (once a minute):\n\t%s\n", gkrellm_debug(DEBUG_SENSORS, "hddtemp_daemon_read (once a minute):\n\t%s\n",
hddtemp_gstring->str); hddtemp_gstring->str);
sep = hddtemp_gstring->str[0]; sep = hddtemp_gstring->str[0];
if (sep == '\0') if (sep == '\0')

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2007 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,7 +1,7 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| 2002 Bill Nalen | 2002 Bill Nalen
| 2007-2009 Stefan Gehn | 2007-2010 Stefan Gehn
| |
| Authors: Bill Wilson billw@gkrellm.net | Authors: Bill Wilson billw@gkrellm.net
| Bill Nalen bill@nalens.com | Bill Nalen bill@nalens.com
@ -92,7 +92,7 @@ typedef struct _SYSTEM_PAGEFILE_INFORMATION
* are present in the headers provided by mingw-w64. * are present in the headers provided by mingw-w64.
* Docs: http://msdn.microsoft.com/en-us/library/aa378290(VS.85).aspx * Docs: http://msdn.microsoft.com/en-us/library/aa378290(VS.85).aspx
*/ */
#if !defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW32_MAJOR_VERSION) #if defined(__MINGW32__) && !defined(WIN64)
typedef struct _SECURITY_LOGON_SESSION_DATA typedef struct _SECURITY_LOGON_SESSION_DATA
{ {
ULONG Size; ULONG Size;
@ -1512,7 +1512,6 @@ gkrellm_sys_proc_read_data(void)
num_forks /*n_forks*/, fload); num_forks /*n_forks*/, fload);
} }
void void
gkrellm_sys_proc_read_users(void) gkrellm_sys_proc_read_users(void)
{ {
@ -2260,7 +2259,7 @@ static void win32_read_tcp6_data(void)
win32_warning(NULL, dwStatus, win32_warning(NULL, dwStatus,
"Could not fetch list of IPv6 TCP connections"); "Could not fetch list of IPv6 TCP connections");
} }
} }
#endif #endif
void gkrellm_sys_inet_read_tcp_data(void) void gkrellm_sys_inet_read_tcp_data(void)

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,6 +1,6 @@
/* GKrellM Windows Portion /* GKrellM Windows Portion
| Copyright (C) 2002 Bill Nalen | Copyright (C) 2002 Bill Nalen
| 2007-2009 Stefan Gehn | 2007-2010 Stefan Gehn
| |
| Authors: Bill Nalen bill@nalens.com | Authors: Bill Nalen bill@nalens.com
| Stefan Gehn stefan+gkrellm@srcbox.net | Stefan Gehn stefan+gkrellm@srcbox.net

View File

@ -1,6 +1,6 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| 2007-2009 Stefan Gehn | 2007-2010 Stefan Gehn
| |
| Authors: Bill Wilson billw@gkrellm.net | Authors: Bill Wilson billw@gkrellm.net
| Stefan Gehn stefan+gkrellm@srcbox.net | Stefan Gehn stefan+gkrellm@srcbox.net

View File

@ -1,6 +1,6 @@
/* GKrellM Windows Portion /* GKrellM Windows Portion
| Copyright (C) 2002 Bill Nalen | Copyright (C) 2002 Bill Nalen
| 2007-2009 Stefan Gehn | 2007-2010 Stefan Gehn
| |
| Authors: Bill Nalen bill@nalens.com | Authors: Bill Nalen bill@nalens.com
| Stefan Gehn stefan+gkrellm@srcbox.net | Stefan Gehn stefan+gkrellm@srcbox.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net

View File

@ -1,6 +1,6 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| 2007-2009 Stefan Gehn | 2007-2010 Stefan Gehn
| |
| Authors: Bill Wilson billw@gkrellm.net | Authors: Bill Wilson billw@gkrellm.net
| Stefan Gehn stefan+gkrellm@srcbox.net | Stefan Gehn stefan+gkrellm@srcbox.net

View File

@ -1,5 +1,5 @@
/* GKrellM /* GKrellM
| Copyright (C) 1999-2009 Bill Wilson | Copyright (C) 1999-2010 Bill Wilson
| |
| Author: Bill Wilson billw@gkrellm.net | Author: Bill Wilson billw@gkrellm.net
| Latest versions might be found at: http://gkrellm.net | Latest versions might be found at: http://gkrellm.net