fix file read breakage

This commit is contained in:
David Woodhouse 2007-02-04 18:51:19 +00:00
parent 50e357198b
commit 1a05c79e94
2 changed files with 9 additions and 6 deletions

View File

@ -4,7 +4,7 @@
static enum dhcp_token read_number PROTO ((int, struct parse *)); static enum dhcp_token read_number PROTO ((int, struct parse *));
static enum dhcp_token read_num_or_name PROTO ((int, struct parse *)); static enum dhcp_token read_num_or_name PROTO ((int, struct parse *));
static enum dhcp_token intern PROTO ((char *, enum dhcp_token)); static enum dhcp_token intern PROTO ((char *, enum dhcp_token));
+static char read_function PROTO ((struct parse *)); +static int read_function PROTO ((struct parse *));
isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp) isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp)
struct parse **cfile; struct parse **cfile;
@ -52,10 +52,10 @@
} }
+ +
+ +
+static char +static int
+read_function (struct parse * cfile) +read_function (struct parse * cfile)
+{ +{
+ char c; + int c;
+ +
+ cfile -> buflen = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz); + cfile -> buflen = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz);
+ if (cfile -> buflen == 0) { + if (cfile -> buflen == 0) {
@ -1718,7 +1718,7 @@
unsigned bufix, buflen; unsigned bufix, buflen;
unsigned bufsiz; unsigned bufsiz;
+ +
+ char (*read_function) (struct parse *); + int (*read_function) (struct parse *);
}; };
/* Variable-length array of data. */ /* Variable-length array of data. */
@ -2552,7 +2552,7 @@
+} +}
+ +
+ +
+static char +static int
+ldap_read_function (struct parse *cfile) +ldap_read_function (struct parse *cfile)
+{ +{
+ char *dn, eofstring[2] = {EOF, '\0'}; + char *dn, eofstring[2] = {EOF, '\0'};

View File

@ -8,7 +8,7 @@
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent. Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent.
Name: dhcp Name: dhcp
Version: 3.0.5 Version: 3.0.5
Release: 14%{?dist} Release: 15%{?dist}
Epoch: 12 Epoch: 12
License: distributable License: distributable
Group: System Environment/Daemons Group: System Environment/Daemons
@ -354,6 +354,9 @@ exit 0
%{_libdir}/libdhcp4client.so %{_libdir}/libdhcp4client.so
%changelog %changelog
* Sun Feb 04 2007 David Woodhouse <dwmw2@redhat.com> - 12:3.0.5-15
- Fix broken file reading due to LDAP patch
* Fri Feb 02 2007 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-14 * Fri Feb 02 2007 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-14
- Only export the symbols we want in libdhcp4client (#198496) - Only export the symbols we want in libdhcp4client (#198496)