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 42d5b7a856dee6afeb1098c6a5402c48af95bff5..5022fbd71882a13b7f41dfb3c52e91110534f73a 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);
}
- fw3_command_close();
+ if (exec)
+ fw3_command_close();
}
diff --git
a/ipsets.c
b/ipsets.c
index e149b5baa6ef24d0a49d7b28f492d10174bcfb1e..d33873a249fce4b7d9d4b222b25e5415fc34f220 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("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)