summaryrefslogtreecommitdiffstats
path: root/server/tests/basic_event_loop.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-03-24 17:34:29 +0100
committerHans de Goede <hdegoede@redhat.com>2011-03-24 17:34:29 +0100
commitc23141739309d8a59c467cc8bd0df027fa899a5b (patch)
tree232189547e727461d526aca3403197654d373623 /server/tests/basic_event_loop.c
parentbcf9a60aa97419e12dc83916719e3633bfbb872f (diff)
server: avoid unneeded recursion in dispatch_vdi_port_data
dispatch_vdi_port_data, was calling vdi_read_buf_release when no client is connected to free the passed in buf. The only difference between vdi_read_buf_release and directly adding the buffer back to the ring with ring_add, is that vdi_read_buf_release calls read_from_vdi_port after adding the buffer back. But dispatch_vdi_port_data only gets called from read_from_vdi_port itself, thus this would lead to recursing into read_from_vdi_port. read_from_vdi_port is protected against recursion and will immediately return if called recursively. Thus calling vdi_read_buf_release from dispatch_vdi_port_data is pointless, instead simply putting the buffer back in the ring suffices.
Diffstat (limited to 'server/tests/basic_event_loop.c')
0 files changed, 0 insertions, 0 deletions