1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-12 19:06:36 +00:00

scan ports as short. debian bug# 359974

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@614 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-03-30 01:23:59 +00:00
parent c4bf55b542
commit 6aef55aa00
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
# $Id$
2006-03-29
* Scan port numbers as short. Fixes debian bug# 359974.
2006-03-25
* Added XMMS2 patch 1456203 from Lassi Selander
* Added FreeBSD battery patch 1456008 from Petr Holub

View File

@ -816,9 +816,9 @@ void update_tcp_port_monitor_collection(
/* 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" );