2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 13:27:59 +00:00

63 Commits

Author SHA1 Message Date
Ben Pfaff
7c88a5dc3a jsonrpc: Fix potential memory leak.
This is unlikely to occur very often in practice, because s->stream
usually gets stuffed into s->rpc before long, but it is still a good idea
to fix it.
2010-03-24 16:52:07 -07:00
Ben Pfaff
36d802ae1f json: New function json_to_ds().
Some upcoming code wants to serialize JSON into a "struct ds" dynamic
string buffer, so expose an interface to do this.

This commit doesn't change much, but it renames some functions internal
to json.c to make the naming more consistent.

Also, make jsonrpc_log_msg() use this new function, since it is a more
straightforward way to do what it wants.
2010-01-26 09:49:30 -08:00
Ben Pfaff
7b8dbc8d8f jsonrpc: Fix memory leak in jsonrpc_session_send() when not connected.
Partial fix for bug #2373.
2010-01-12 14:28:00 -08:00
Ben Pfaff
f3d00a23ad 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>
2010-01-11 13:06:42 -08:00
Ben Pfaff
a1ae9a4316 jsonrpc: Properly implement connection timeout.
jsonrpc_session_connect() indirectly called reconnect_disconnected(), which
told the reconnect object that the connection had failed, before it told it
that the connection attempt had started.  When the connection didn't
complete immediately, this caused the connection to time out immediately,
without any backoff.

Reported by Jeremy Stribling.
2010-01-08 15:36:06 -08:00
Ben Pfaff
108496163d stream: Remove spurious #includes from header file. 2010-01-06 14:32:22 -08:00
Ben Pfaff
539e96f623 stream: Add stream_run(), stream_run_wait() functions.
SSL, which will be added in an upcoming commit, requires some background
processing, which is best done in a "run" function in our architecture.
This commit adds stream_run() and stream_run_wait() and calls to them from
the places where they will be required.
2010-01-06 14:26:48 -08:00
Ben Pfaff
4931f33ad9 ovsdb-server: Factor out complication by using jsonrpc_session. 2010-01-04 09:47:01 -08:00
Ben Pfaff
20bed8be25 jsonrpc: Make it easy to get a new JSON-RPC request's id. 2009-12-02 11:19:08 -08:00
Ben Pfaff
dcbb691b00 jsonrpc: New type "jsonrpc_session", which automatically reconnects. 2009-12-02 11:19:03 -08:00
Ben Pfaff
1fd13cde12 jsonrpc: Add logging for messages sent and received, at DBG level.
This made it much easier to see problems while developing some
ovsdb-server features.
2009-11-17 16:02:46 -08:00
Ben Pfaff
d0632593fe ovsdb: Add new ovsdb-client program. 2009-11-06 15:35:34 -08:00
Ben Pfaff
f212909325 Implement JSON-RPC protocol. 2009-11-04 15:24:40 -08:00