mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 04:43:54 -06:00
qemu-char: Move incrementing of avail_connections to qdev-properties-system
The decrement of avail_connections is done in qdev-properties-system move the increment there too for proper balancing of the calls. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-8-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
574b711a92
commit
85d91e3295
2 changed files with 4 additions and 4 deletions
|
@ -136,9 +136,11 @@ static void release_chr(Object *obj, const char *name, void *opaque)
|
|||
DeviceState *dev = DEVICE(obj);
|
||||
Property *prop = opaque;
|
||||
CharDriverState **ptr = qdev_get_prop_ptr(dev, prop);
|
||||
CharDriverState *chr = *ptr;
|
||||
|
||||
if (*ptr) {
|
||||
qemu_chr_add_handlers(*ptr, NULL, NULL, NULL, NULL);
|
||||
if (chr) {
|
||||
qemu_chr_add_handlers(chr, NULL, NULL, NULL, NULL);
|
||||
++chr->avail_connections;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue