Changeset 43793 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Nov 2, 2012 9:26:20 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r43792 r43793 357 357 #ifdef VBOX_WITH_DBUS 358 358 # if defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ 359 /* Handle desktop sessions using ConsoleKit. */360 VBoxServiceVerbose(4, "Checking ConsoleKit sessions ...\n");361 362 359 DBusError dbErr; 363 dbus_error_init(&dbErr); 364 365 DBusConnection *pConnection = dbus_bus_get(DBUS_BUS_SYSTEM, &dbErr); 360 DBusConnection *pConnection = NULL; 361 int rc2 = RTDBusLoadLib(); 362 if (RT_SUCCESS(rc2)) 363 { 364 /* Handle desktop sessions using ConsoleKit. */ 365 VBoxServiceVerbose(4, "Checking ConsoleKit sessions ...\n"); 366 367 dbus_error_init(&dbErr); 368 pConnection = dbus_bus_get(DBUS_BUS_SYSTEM, &dbErr); 369 } 370 366 371 if ( pConnection 367 372 && !dbus_error_is_set(&dbErr)) … … 494 499 static int s_iBitchedAboutDBus = 0; 495 500 if (s_iBitchedAboutDBus++ < 3) 496 VBoxServiceError("Unable to connect to system D-Bus (%d/3)\n", s_iBitchedAboutDBus); 501 VBoxServiceError("Unable to connect to system D-Bus (%d/3): %s\n", s_iBitchedAboutDBus, 502 dbus_error_is_set(&dbErr) ? dbErr.message : "D-Bus not installed\n"); 497 503 } 498 504 … … 987 993 #endif /* RT_OS_WINDOWS */ 988 994 989 int rc2;990 #ifdef VBOX_WITH_DBUS991 rc2 = RTDBusLoadLib();992 if (RT_FAILURE(rc2))993 VBoxServiceVerbose(0, "VMInfo: D-Bus seems not to be installed; no ConsoleKit session handling available\n");994 #endif /* VBOX_WITH_DBUS */995 996 995 /* 997 996 * Write the fixed properties first. … … 1033 1032 if (*pfShutdown) 1034 1033 break; 1035 rc2 = RTSemEventMultiWait(g_hVMInfoEvent, g_cMsVMInfoInterval);1034 int rc2 = RTSemEventMultiWait(g_hVMInfoEvent, g_cMsVMInfoInterval); 1036 1035 if (*pfShutdown) 1037 1036 break;
Note:
See TracChangeset
for help on using the changeset viewer.