projects
/
project
/
firewall3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5490411
)
Do not print to pipe or close command if nothing was executed
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 21 May 2013 14:43:56 +0000
(16:43 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 21 May 2013 14:43:56 +0000
(16:43 +0200)
includes.c
patch
|
blob
|
history
ipsets.c
patch
|
blob
|
history
diff --git
a/includes.c
b/includes.c
index
42d5b7a
..
5022fbd
100644
(file)
--- a/
includes.c
+++ b/
includes.c
@@
-135,7
+135,8
@@
fw3_print_includes(struct fw3_state *state, enum fw3_family family, bool reload)
print_include(include);
}
print_include(include);
}
- fw3_command_close();
+ if (exec)
+ fw3_command_close();
}
}
diff --git
a/ipsets.c
b/ipsets.c
index
e149b5b
..
d33873a
100644
(file)
--- a/
ipsets.c
+++ b/
ipsets.c
@@
-384,8
+384,11
@@
fw3_destroy_ipsets(struct fw3_state *state)
fw3_pr("destroy %s\n", ipset->name);
}
fw3_pr("destroy %s\n", ipset->name);
}
- fw3_pr("quit\n");
- fw3_command_close();
+ if (exec)
+ {
+ fw3_pr("quit\n");
+ fw3_command_close();
+ }
/* wait for ipsets to disappear */
list_for_each_entry(ipset, &state->ipsets, list)
/* wait for ipsets to disappear */
list_for_each_entry(ipset, &state->ipsets, list)