version 2.6.1

* configure.in: version 2.6.1
This commit is contained in:
Benoît Dejean
2004-07-11 21:01:27 +00:00
parent de7fd9e85b
commit c73d0eb3c9
54 changed files with 731 additions and 648 deletions

View File

@@ -52,35 +52,40 @@ glibtop_init_ppp_s (glibtop *server)
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
}
static gboolean
static int
get_ISDN_stats (glibtop *server, int *in, int *out)
{
unsigned long isdn_stats[2 * ISDN_MAX_CHANNELS], *ptr;
int fd;
unsigned long *isdn_stats, *ptr;
int fd, i;
*in = *out = 0;
isdn_stats = g_malloc (ISDN_MAX_CHANNELS * 2 * sizeof (unsigned long));
fd = open ("/dev/isdninfo", O_RDONLY);
if (fd < 0) {
g_free (isdn_stats);
return FALSE;
}
if ((ioctl (fd, IIOCGETCPS, isdn_stats) < 0) && (errno != 0)) {
close(fd);
g_free (isdn_stats);
close (fd);
return FALSE;
}
for (ptr = isdn_stats;
ptr != (isdn_stats + G_N_ELEMENTS(isdn_stats));
/* NOOP */) {
for (i = 0, ptr = isdn_stats; i < ISDN_MAX_CHANNELS; i++) {
*in += *ptr++; *out += *ptr++;
}
g_free (isdn_stats);
close (fd);
return TRUE;
}
static gboolean is_ISDN_on (glibtop *server, int *online)
static int is_ISDN_on (glibtop *server, int *online)
{
FILE *f = 0;
char buffer [BUFSIZ], *p;