VirtualBox

Changeset 24069 in vbox for trunk/src


Ignore:
Timestamp:
Oct 26, 2009 12:38:01 PM (15 years ago)
Author:
vboxsync
Message:

VBoxClient: Added delay for host update check, misc logging.

Location:
trunk/src/VBox/Additions/x11/VBoxClient
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h

    r23859 r24069  
    3636    virtual const char *getPidFilePath() = 0;
    3737    /** Run the service main loop */
    38     virtual int run() = 0;
     38    virtual int run(bool fDaemonised = false) = 0;
    3939    /** Clean up any global resources before we shut down hard */
    4040    virtual void cleanup() = 0;
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp

    r21651 r24069  
    290290        return ".vboxclient-clipboard.pid";
    291291    }
    292     virtual int run()
     292    virtual int run(bool fDaemonised /* = false */)
    293293    {
    294294        int rc = vboxClipboardConnect();
  • trunk/src/VBox/Additions/x11/VBoxClient/display.cpp

    r22706 r24069  
    104104    while (true)
    105105        XNextEvent(pDisplay, &ev);
     106    return 0;
    106107}
    107108
     
    178179        return ".vboxclient-display.pid";
    179180    }
    180     virtual int run()
     181    virtual int run(bool fDaemonised /* = false */)
    181182    {
    182183        int rc = initDisplay();
  • trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp

    r23949 r24069  
    2323#include <iprt/ldr.h>
    2424#include <iprt/string.h>
     25#include <iprt/thread.h>
    2526
    2627#ifdef VBOX_WITH_DBUS
     
    6263            if (conn == NULL)
    6364            {
    64                 LogFlow(("Could not create D-BUS message!\n"));
     65                Log(("Could not create D-BUS message!\n"));
    6566                rc = VERR_INVALID_HANDLE;
    6667            }
     
    9899            dbus_message_iter_append_basic(&iter,DBUS_TYPE_INT32,&msg_timeout);
    99100
    100             /* @todo Send with waiting for a reply! */
    101             if (dbus_connection_send(conn, msg, NULL))
     101            DBusError err;
     102            dbus_connection_send_with_reply_and_block(conn, msg, 30 * 1000, &err);
    102103                dbus_connection_flush(conn);
    103104        }
     
    113114    /** @todo Move this part in VbglR3 and just provide a callback for the platform-specific
    114115              notification stuff, since this is very similar to the VBoxTray code. */
    115     virtual int run()
     116    virtual int run(bool fDaemonised /* = false */)
    116117    {
    117118        int rc;
    118119        LogFlowFunc(("\n"));
     120
     121        /* Because we need desktop notifications to be displayed, wait
     122         * some time to make the desktop environment load (as a work around). */
     123        if (fDaemonised)
     124            RTThreadSleep(30 * 1000 /* Wait 30 seconds */);
     125
    119126# ifdef VBOX_WITH_DBUS
    120127        rc = RTDBusLoadLib();
     
    131138            rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID);
    132139            if (RT_FAILURE(rc))
    133                 LogFlow(("Cannot connect to guest property service! rc = %Rrc\n", rc));
     140                Log(("Cannot connect to guest property service! rc = %Rrc\n", rc));
    134141        }
    135142
     
    154161                                                      "install option from the Devices menu.", pszGuestVersion, pszHostVersion);
    155162                    rc = showNotify(szTitle, szMsg);
     163                    LogRel(("VBoxClient: VirtualBox Guest Additions update available!"));
    156164                    if (RT_FAILURE(rc))
    157165                        Log(("VBoxClient: Could not show version notifier tooltip! rc = %d\n", rc));
  • trunk/src/VBox/Additions/x11/VBoxClient/main.cpp

    r23971 r24069  
    264264    /* Set an X11 I/O error handler, so that we can shutdown properly on fatal errors. */
    265265    XSetIOErrorHandler(vboxClientXLibIOErrorHandler);
    266     g_pService->run();
     266    g_pService->run(fDaemonise);
    267267    VBoxClient::CleanUp();
    268268    return 1;  /* We should never get here. */
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp

    r18938 r24069  
    3636        return ".vboxclient-seamless.pid";
    3737    }
    38     virtual int run()
     38    virtual int run(bool fDaemonised /* = false */)
    3939    {
    4040        /* Initialise threading in X11 and in Xt. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette