[libvirt] [PATCH 3/5] qemu: vnc: mark websocket as used on reconnect

Nikolay Shirokovskiy posted 5 patches 7 years, 7 months ago
[libvirt] [PATCH 3/5] qemu: vnc: mark websocket as used on reconnect
Posted by Nikolay Shirokovskiy 7 years, 7 months ago
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
---
 src/qemu/qemu_process.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index de2e84b..09e0327 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4326,7 +4326,8 @@ qemuProcessGraphicsReservePorts(virDomainGraphicsDefPtr graphics,
                 return -1;
             graphics->data.vnc.portReserved = true;
         }
-        if (graphics->data.vnc.websocket > 0) {
+        if (graphics->data.vnc.websocket > 0 ||
+            reconnect) {
             if (virPortAllocatorSetUsed(graphics->data.vnc.websocket) < 0)
                 return -1;
             graphics->data.vnc.websocketReserved = true;
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/5] qemu: vnc: mark websocket as used on reconnect
Posted by John Ferlan 7 years, 6 months ago

On 07/04/2018 07:03 AM, Nikolay Shirokovskiy wrote:
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
> ---
>  src/qemu/qemu_process.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

So your contention is that commit id 84067696 missed a condition?

I agree, but would like you to reference that commit id in your commit
message before pushing - especially since AIUI websocket > 0 means it's
a port we've specifically wanted reserved.

Reviewed-by: John Ferlan <jferlan@redhat.com>

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/5] qemu: vnc: mark websocket as used on reconnect
Posted by Nikolay Shirokovskiy 7 years, 6 months ago

On 17.07.2018 23:16, John Ferlan wrote:
> 
> 
> On 07/04/2018 07:03 AM, Nikolay Shirokovskiy wrote:
>> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
>> ---
>>  src/qemu/qemu_process.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
> 
> So your contention is that commit id 84067696 missed a condition?
> 
> I agree, but would like you to reference that commit id in your commit
> message before pushing - especially since AIUI websocket > 0 means it's
> a port we've specifically wanted reserved.
> 

Honestly I don't undestand why I wrote this patch. On reconnection whether
websocket is auto generated or not it will be marked as used in qemuProcessGraphicsReservePorts
because it is > 0.

Nikolay

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list