Package: conky
Version: 1.4.1-1
Severity: normal

On powerpc platform, the TCP port monitoring of conky does not work. It
seems that the port information (of type in_port_t == unsigned short)
is not correctly scanned. The attached patch fixes the problem on my
machine (powerpc ibook).

regards,
  Vivenzio


diff -uNr conky-1.4.1/src/libtcp-portmon.c 
conky-1.4.1_patched/src/libtcp-portmon.c
--- conky-1.4.1/src/libtcp-portmon.c    2006-03-13 00:24:19.000000000 +0100
+++ conky-1.4.1_patched/src/libtcp-portmon.c    2006-03-29 22:30:11.000000000 
+0200
@@ -816,9 +816,9 @@
         /* read all tcp connections */
         while (fgets (buf, sizeof (buf), fp) != NULL) {
 
-                if ( sscanf (buf, "%*d: %lx:%lx %lx:%lx %lx %*x:%*x %*x:%*x 
%*x %lu %*d %lu",
-                        (unsigned long *)&conn.local_addr, (unsigned long 
*)&conn.local_port,
-                        (unsigned long *)&conn.remote_addr, (unsigned long 
*)&conn.remote_port,
+                if ( sscanf (buf, "%*d: %lx:%hx %lx:%hx %lx %*x:%*x %*x:%*x 
%*x %lu %*d %lu",
+                        (unsigned long *)&conn.local_addr, &conn.local_port,
+                        (unsigned long *)&conn.remote_addr, &conn.remote_port,
                         (unsigned long *)&state, (unsigned long *)&uid, 
(unsigned long *)&inode) != 7 )
 
                         fprintf( stderr, "/proc/net/tcp: bad file format\n" );


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable'), (800, 'experimental')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-powerpc-ibook-g4
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8) (ignored: LC_ALL 
set to [EMAIL PROTECTED])

Versions of packages conky depends on:
ii  libc6                     2.3.6-4        GNU C Library: Shared libraries an
ii  libexpat1                 1.95.8-3.1     XML parsing C library - runtime li
ii  libfontconfig1            2.3.2-5        generic font configuration library
ii  libfreetype6              2.1.10-2       FreeType 2 font engine, shared lib
ii  libice6                   6.9.0.dfsg.1-5 Inter-Client Exchange library
ii  libsm6                    6.9.0.dfsg.1-5 X Window System Session Management
ii  libx11-6                  6.9.0.dfsg.1-5 X Window System protocol client li
ii  libxext6                  6.9.0.dfsg.1-5 X Window System miscellaneous exte
ii  libxft2                   2.1.8.2-5.1    FreeType-based font drawing librar
ii  libxrender1               1:0.9.0.2-1    X Rendering Extension client libra
ii  zlib1g                    1:1.2.3-11     compression library - runtime

conky recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to