Rev 386: - ignore blank lines at end of lists in
http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Tue May 29 06:23:47 GMT 2007
------------------------------------------------------------
revno: 386
revision-id: tridge at samba.org-20070529062347-6zqhcauyt2y25nvz
parent: tridge at samba.org-20070529060202-b5d16t238ncw2x2q
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Tue 2007-05-29 16:23:47 +1000
message:
- ignore blank lines at end of lists
- rpm tweaks
modified:
common/ctdb.c ctdb.c-20061127094323-t50f58d65iaao5of-2
packaging/RHEL/ctdb.spec ctdb.spec-20070527204758-biuh7znabuwan3zn-3
takeover/ctdb_takeover.c ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
=== modified file 'common/ctdb.c'
--- a/common/ctdb.c 2007-05-29 02:49:25 +0000
+++ b/common/ctdb.c 2007-05-29 06:23:47 +0000
@@ -151,6 +151,9 @@
ctdb_set_error(ctdb, "Failed to load nlist '%s'\n", nlist);
return -1;
}
+ while (nlines > 0 && strcmp(lines[nlines-1], "") == 0) {
+ nlines--;
+ }
for (i=0;i<nlines;i++) {
if (ctdb_add_node(ctdb, lines[i]) != 0) {
=== modified file 'packaging/RHEL/ctdb.spec'
--- a/packaging/RHEL/ctdb.spec 2007-05-29 06:02:02 +0000
+++ b/packaging/RHEL/ctdb.spec 2007-05-29 06:23:47 +0000
@@ -43,6 +43,8 @@
CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
--prefix=%{_prefix} \
+ --sysconfdir=%{_sysconfdir} \
+ --localstatedir="/var"
make showflags
make
=== modified file 'takeover/ctdb_takeover.c'
--- a/takeover/ctdb_takeover.c 2007-05-29 03:48:30 +0000
+++ b/takeover/ctdb_takeover.c 2007-05-29 06:23:47 +0000
@@ -237,6 +237,9 @@
ctdb_set_error(ctdb, "Failed to load public address list '%s'\n", alist);
return -1;
}
+ while (nlines > 0 && strcmp(lines[nlines-1], "") == 0) {
+ nlines--;
+ }
if (nlines != ctdb->num_nodes) {
DEBUG(0,("Number of lines in %s does not match number of nodes!\n", alist));
More information about the samba-cvs
mailing list