diff options
| author | Hans de Goede <hdegoede@redhat.com> | 2011-03-24 17:34:29 +0100 |
|---|---|---|
| committer | Hans de Goede <hdegoede@redhat.com> | 2011-03-24 17:34:29 +0100 |
| commit | c23141739309d8a59c467cc8bd0df027fa899a5b (patch) | |
| tree | 232189547e727461d526aca3403197654d373623 /client/application.cpp | |
| parent | bcf9a60aa97419e12dc83916719e3633bfbb872f (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 'client/application.cpp')
0 files changed, 0 insertions, 0 deletions
