From 3a8d38c88e26f9f76f3c60efbcbead02240c26d0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 5 Sep 2012 13:34:35 -0700 Subject: jsonrpc: Treat receiving part of a message as activity. Until now, the jsonrpc code has only counted receiving a full JSON-RPC messages as activity. This could theoretically time out, then, while a very long message is in transit or if a slow link is involved. This commit changes this code to count receiving any part of a message as activity. This isn't a problem for OpenFlow connections because OpenFlow messages are at most 64 kB in size. This problem hasn't actually been observed in practice. Bug #12789. Signed-off-by: Ben Pfaff --- lib/jsonrpc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/jsonrpc.h') diff --git a/lib/jsonrpc.h b/lib/jsonrpc.h index cd78170cf..44ae06f2e 100644 --- a/lib/jsonrpc.h +++ b/lib/jsonrpc.h @@ -50,6 +50,7 @@ void jsonrpc_wait(struct jsonrpc *); int jsonrpc_get_status(const struct jsonrpc *); size_t jsonrpc_get_backlog(const struct jsonrpc *); +unsigned int jsonrpc_get_received_bytes(const struct jsonrpc *); const char *jsonrpc_get_name(const struct jsonrpc *); int jsonrpc_send(struct jsonrpc *, struct jsonrpc_msg *); -- cgit v1.2.1