Ticket #9442: 0001-Change-DirectConnected-time-limit-fixes-9442.patch

File 0001-Change-DirectConnected-time-limit-fixes-9442.patch, 1.3 KB (added by AGMS, 11 years ago)

Patch to change the DirectConnected() timeout to three seconds.

  • src/servers/app/DirectWindowInfo.cpp

    From 379e2d8f6706e0b2f701bf739538bc9b89221723 Mon Sep 17 00:00:00 2001
    From: "Alexander G. M. Smith" <agmsmith@ncf.ca>
    Date: Wed, 6 Feb 2013 13:49:36 -0500
    Subject: [PATCH] Change DirectConnected() time limit, fixes #9442
    
    Change the time limit for BDirectWindow's DirectConnected()
    callback function to be 3 seconds, as described in the BeBook.
    Was a much shorter 0.5 seconds, which was causing problems
    with VNCServer when screen resolutions were changed.
    ---
     src/servers/app/DirectWindowInfo.cpp |    6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/servers/app/DirectWindowInfo.cpp b/src/servers/app/DirectWindowInfo.cpp
    index d005a53..f2300ea 100644
    a b DirectWindowInfo::_SyncronizeWithClient()  
    171171    if (status != B_OK)
    172172        return status;
    173173
    174     // Wait with a timeout of half a second until the client exits
    175     // from its DirectConnected() implementation
     174    // Wait with a timeout of three seconds (as in BeOS) until the
     175    // client exits from its DirectConnected() implementation
    176176    do {
    177         status = acquire_sem_etc(fAcknowledgeSem, 1, B_TIMEOUT, 500000);
     177        status = acquire_sem_etc(fAcknowledgeSem, 1, B_TIMEOUT, 3000000);
    178178    } while (status == B_INTERRUPTED);
    179179
    180180    return status;