numam-spdk/lib/jsonrpc
Pawel Wodkowski 01a9118d0c jsonrpc: fix closed connection hadling
The spdk_jsonrpc_server_conn_remove() was just swapping last connection
with that is being removed. This was fine but not for BSD queues which
rely on its own address.

Simple fix would be to add STAILQ_INIT and STAILQ_SWAP for queued
requests but we can hit the same nasty and easy to overlook bug in
future. Instead convert connection array to linked list and move around
only pointers.

Fixes #322

Change-Id: Ibb359d281f6164bcd17df37ba9d31ffdb46c2e0a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/414257
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-08 18:11:18 +00:00
..
jsonrpc_internal.h jsonrpc: fix closed connection hadling 2018-06-08 18:11:18 +00:00
jsonrpc_server_tcp.c jsonrpc: fix closed connection hadling 2018-06-08 18:11:18 +00:00
jsonrpc_server.c jsonrpc: make "jsonrpc" actually optional 2018-05-30 16:38:07 +00:00
Makefile build: include spdk.common.mk in lib Makefiles 2016-07-18 16:17:40 -07:00