mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 14:55:18 +00:00
jsonrpc: Check RPC status after trying to send, not before.
This usually prevented JSON-RPC over SSL from working. Reported-by: Jeremy Stribling <strib@nicira.com>
This commit is contained in:
@@ -278,12 +278,14 @@ jsonrpc_send_block(struct jsonrpc *rpc, struct jsonrpc_msg *msg)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!queue_is_empty(&rpc->output) && !rpc->status) {
|
for (;;) {
|
||||||
jsonrpc_run(rpc);
|
jsonrpc_run(rpc);
|
||||||
|
if (queue_is_empty(&rpc->output) || rpc->status) {
|
||||||
|
return rpc->status;
|
||||||
|
}
|
||||||
jsonrpc_wait(rpc);
|
jsonrpc_wait(rpc);
|
||||||
poll_block();
|
poll_block();
|
||||||
}
|
}
|
||||||
return rpc->status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Reference in New Issue
Block a user