projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03b1f24
)
jsonrpc: Check RPC status after trying to send, not before.
author
Ben Pfaff
<blp@nicira.com>
Mon, 11 Jan 2010 21:06:42 +0000
(13:06 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Mon, 11 Jan 2010 21:06:42 +0000
(13:06 -0800)
This usually prevented JSON-RPC over SSL from working.
Reported-by: Jeremy Stribling <strib@nicira.com>
lib/jsonrpc.c
patch
|
blob
|
history
diff --git
a/lib/jsonrpc.c
b/lib/jsonrpc.c
index aeb1dd8245fa77b14562b986472ab55fc1d1ea4a..f648f6b162af5f4aef1361c066786f0c6c5ea292 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