Changeset 54008 in vbox for trunk/src/VBox
- Timestamp:
- Jan 28, 2015 11:23:10 AM (10 years ago)
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
r53624 r54008 285 285 static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised) 286 286 { 287 int rc = vboxClipboardConnect();287 int rc; 288 288 289 289 NOREF(ppInterface); 290 /* Initialise the guest library. */ 291 rc = VbglR3InitUser(); 292 if (RT_FAILURE(rc)) 293 VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc)); 294 rc = vboxClipboardConnect(); 290 295 if (RT_SUCCESS(rc)) 291 296 rc = vboxClipboardMain(); … … 297 302 } 298 303 304 static void cleanup(struct VBCLSERVICE **ppInterface) 305 { 306 NOREF(ppInterface); 307 VbglR3Term(); 308 } 309 299 310 struct VBCLSERVICE vbclClipboardInterface = 300 311 { … … 304 315 VBClServiceDefaultHandler, /* pause */ 305 316 VBClServiceDefaultHandler, /* resume */ 306 VBClServiceDefaultCleanup317 cleanup 307 318 }; 308 319 -
trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
r53966 r54008 123 123 int status; 124 124 125 /* Initialise the guest library. */ 126 int rc = VbglR3InitUser(); 127 if (RT_FAILURE(rc)) 128 VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc)); 125 129 pState->pDisplay = XOpenDisplay(NULL); 126 130 if (!pState->pDisplay) … … 395 399 NOREF(ppInterface); 396 400 disableEventsAndCaps(); 401 VbglR3Term(); 397 402 } 398 403 -
trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
r53624 r54008 2200 2200 int DragAndDropService::x11DragAndDropInit(void) 2201 2201 { 2202 /* Initialise the guest library. */ 2203 int rc = VbglR3InitUser(); 2204 if (RT_FAILURE(rc)) 2205 VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc)); 2202 2206 /* Connect to the x11 server. */ 2203 2207 m_pDisplay = XOpenDisplay(NULL); … … 2210 2214 return VERR_NO_MEMORY; 2211 2215 2212 int rc = VINF_SUCCESS;2213 2216 do 2214 2217 { … … 2409 2412 } 2410 2413 2414 static void cleanup(struct VBCLSERVICE **ppInterface) 2415 { 2416 NOREF(ppInterface); 2417 VbglR3Term(); 2418 } 2419 2411 2420 struct VBCLSERVICE vbclDragAndDropInterface = 2412 2421 { … … 2416 2425 VBClServiceDefaultHandler, /* pause */ 2417 2426 VBClServiceDefaultHandler, /* resume */ 2418 VBClServiceDefaultCleanup2427 cleanup 2419 2428 }; 2420 2429 -
trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp
r53624 r54008 131 131 132 132 NOREF(ppInterface); 133 /* Initialise the guest library. */ 134 rc = VbglR3InitUser(); 135 if (RT_FAILURE(rc)) 136 VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc)); 133 137 /* Because we need desktop notifications to be displayed, wait 134 138 * some time to make the desktop environment load (as a work around). */ … … 193 197 } 194 198 # endif /* VBOX_WITH_GUEST_PROPS */ 199 VbglR3Term(); 195 200 LogFlowFunc(("returning %Rrc\n", rc)); 196 201 return rc; -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r53624 r54008 89 89 if (g_szPidFile[0] && g_hPidFile) 90 90 VbglR3ClosePidFile(g_szPidFile, g_hPidFile); 91 VbglR3Term();92 91 exit(0); 93 92 } … … 287 286 if (!pcszFileName) 288 287 pcszFileName = "VBoxClient"; 289 /* Initialise the guest library. */290 rc = VbglR3InitUser();291 if (RT_FAILURE(rc))292 VBClFatalError(("%s: failed to connect to the VirtualBox kernel service, rc=%Rrc\n",293 pcszFileName, rc));294 288 295 289 /* Parse our option(s) */ -
trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp
r53624 r54008 357 357 if (pSelf->mIsInitialised) 358 358 return VERR_INTERNAL_ERROR; 359 /* Initialise the guest library. */ 360 rc = VbglR3InitUser(); 361 if (RT_FAILURE(rc)) 362 VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc)); 359 363 rc = pSelf->mSeamless.init(); 360 364 if (RT_FAILURE(rc)) … … 404 408 NOREF(ppInterface); 405 409 VbglR3SeamlessSetCap(false); 410 VbglR3Term(); 406 411 } 407 412 -
trunk/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11.cpp
r52586 r54008 89 89 } 90 90 91 VBGLR3DECL(int) VbglR3InitUser(void) { return VINF_SUCCESS; } 92 VBGLR3DECL(void) VbglR3Term(void) {} 93 91 94 /** 92 95 * Xlib error handler for certain errors that we can't avoid.
Note:
See TracChangeset
for help on using the changeset viewer.