auto-import changelog data from net-tools-1.60-36.src.rpm
Mon Sep 06 2004 Radek Vokal <rvokal@redhat.com> 1.60-36 - parse error fixed (#131539)
This commit is contained in:
parent
10d380a096
commit
eb32cc84e8
70
net-tools-1.60-parse.patch
Normal file
70
net-tools-1.60-parse.patch
Normal file
@ -0,0 +1,70 @@
|
||||
--- net-tools-1.60/statistics.c.parse 2004-09-06 10:45:35.595130240 +0200
|
||||
+++ net-tools-1.60/statistics.c 2004-09-06 10:43:11.000000000 +0200
|
||||
@@ -289,7 +289,7 @@
|
||||
return &dummytab;
|
||||
}
|
||||
|
||||
-void process_fd(FILE *f)
|
||||
+void process_fd(FILE *f,int file_desc) // added file_desc to show propriate error mesg
|
||||
{
|
||||
char buf1[1024], buf2[1024];
|
||||
char *sp, *np, *p;
|
||||
@@ -297,12 +297,16 @@
|
||||
int endflag;
|
||||
struct tabtab *tab;
|
||||
|
||||
+ if (strcmp(buf1,"\n") == 0) // cut leading break
|
||||
+ if (!fgets(buf1, sizeof buf1, f))
|
||||
+ break;
|
||||
if (!fgets(buf2, sizeof buf2, f))
|
||||
break;
|
||||
+
|
||||
sp = strchr(buf1, ':');
|
||||
- np = strchr(buf2, ':');
|
||||
- if (!np || !sp)
|
||||
- goto formaterr;
|
||||
+ np = strchr(buf2, ':');
|
||||
+ if (!np || !sp)
|
||||
+ goto formaterr;
|
||||
*sp = '\0';
|
||||
|
||||
tab = newtable(snmptabs, buf1);
|
||||
@@ -333,7 +337,12 @@
|
||||
return;
|
||||
|
||||
formaterr:
|
||||
- perror(_("error parsing /proc/net/snmp"));
|
||||
+ switch(file_desc) {
|
||||
+ case 0: perror(_("error parsing /proc/net/snmp"));
|
||||
+ break;
|
||||
+ case 1: perror(_("error parsing /proc/net/netstat"));
|
||||
+ break;
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -343,13 +352,13 @@
|
||||
FILE *f;
|
||||
|
||||
f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp;
|
||||
-
|
||||
+
|
||||
f = fopen("/proc/net/snmp", "r");
|
||||
if (!f) {
|
||||
perror(_("cannot open /proc/net/snmp"));
|
||||
return(1);
|
||||
}
|
||||
- process_fd(f);
|
||||
+ process_fd(f,0);
|
||||
|
||||
if (ferror(f)) {
|
||||
perror("/proc/net/snmp");
|
||||
@@ -361,7 +370,7 @@
|
||||
f = fopen("/proc/net/netstat", "r");
|
||||
|
||||
if (f) {
|
||||
- process_fd(f);
|
||||
+ process_fd(f,1);
|
||||
|
||||
if (ferror(f)) {
|
||||
perror("/proc/net/netstat");
|
@ -3,7 +3,7 @@
|
||||
Summary: Basic networking tools.
|
||||
Name: net-tools
|
||||
Version: 1.60
|
||||
Release: 35
|
||||
Release: 36
|
||||
License: GPL
|
||||
Group: System Environment/Base
|
||||
Source0: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.bz2
|
||||
@ -32,6 +32,7 @@ Patch18: netplug-1.2.7-installopts.patch
|
||||
Patch19: net-tools-1.60-siunits.patch
|
||||
Patch20: net-tools-1.60-trunc.patch
|
||||
Patch21: net-tools-1.60-return.patch
|
||||
Patch22: net-tools-1.60-parse.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-root
|
||||
Requires(post,preun): chkconfig
|
||||
BuildRequires: gettext
|
||||
@ -63,6 +64,7 @@ ifconfig, netstat, route, and others.
|
||||
%patch19 -p1 -b .siunits
|
||||
%patch20 -p1 -b .trunc
|
||||
%patch21 -p1 -b .return
|
||||
%patch22 -p1 -b .parse
|
||||
|
||||
cp %SOURCE2 ./config.h
|
||||
cp %SOURCE3 ./config.make
|
||||
@ -135,6 +137,9 @@ exit 0
|
||||
%{_sysconfdir}/rc.d/init.d/netplugd
|
||||
|
||||
%changelog
|
||||
* Mon Sep 06 2004 Radek Vokal <rvokal@redhat.com> 1.60-36
|
||||
- parse error fixed (#131539)
|
||||
|
||||
* Fri Sep 03 2004 Radek Vokal <rvokal@redhat.com> 1.60-35
|
||||
- The return value of nameif was wrong (#129032) - patch from Fujitsu QA
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user