VirtualBox

Changeset 24073 in vbox


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

VBoxClient: Added more D-BUS error checking.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dbus-calls.h

    r23863 r24073  
    2727/** The following are the symbols which we need from libdbus-1. */
    2828VBOX_PROXY_STUB(dbus_error_init, void, (DBusError *error),
     29                (error))
     30VBOX_PROXY_STUB(dbus_error_is_set, dbus_bool_t, (const DBusError *error),
    2931                (error))
    3032VBOX_PROXY_STUB(dbus_bus_get, DBusConnection *,
  • trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp

    r24069 r24073  
    100100
    101101            DBusError err;
    102             dbus_connection_send_with_reply_and_block(conn, msg, 30 * 1000, &err);
     102            DBusMessage *reply;
     103            reply = dbus_connection_send_with_reply_and_block(conn, msg,
     104                30 * 1000 /* 30 seconds timeout */, &err);
     105            if (dbus_error_is_set(&err))
     106            {
     107                Log(("D-BUS returned an error while sending the notification: %s", err.message));
     108            }
     109            else if (reply)
     110            {
    103111                dbus_connection_flush(conn);
     112                dbus_message_unref(reply);
     113            }
    104114        }
    105115        if (msg != NULL)
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