git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
jsonrpc: Check RPC status after trying to send, not before.
[sliver-openvswitch.git]
/
lib
/
jsonrpc.c
diff --git
a/lib/jsonrpc.c
b/lib/jsonrpc.c
index
aeb1dd8
..
f648f6b
100644
(file)
--- a/
lib/jsonrpc.c
+++ b/
lib/jsonrpc.c
@@
-278,12
+278,14
@@
jsonrpc_send_block(struct jsonrpc *rpc, struct jsonrpc_msg *msg)
return error;
}
-
while (!queue_is_empty(&rpc->output) && !rpc->status
) {
+
for (;;
) {
jsonrpc_run(rpc);
+ if (queue_is_empty(&rpc->output) || rpc->status) {
+ return rpc->status;
+ }
jsonrpc_wait(rpc);
poll_block();
}
- return rpc->status;
}
int