hw/xwin: Remove XOpenDisplay() retry code
Remove XOpenDisplay() retry code. This isn't a sensible thing for the application to be doing, and XWin server needs to retry much more than just XOpenDisplay(). Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
4fc62aef80
commit
4a38c3bda2
|
@ -111,7 +111,6 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
|
||||||
int iMaxDescriptor;
|
int iMaxDescriptor;
|
||||||
Display *pDisplay = NULL;
|
Display *pDisplay = NULL;
|
||||||
Window iWindow = None;
|
Window iWindow = None;
|
||||||
int iRetries;
|
|
||||||
int iSelectError;
|
int iSelectError;
|
||||||
Bool fShutdown = FALSE;
|
Bool fShutdown = FALSE;
|
||||||
|
|
||||||
|
@ -140,26 +139,8 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
|
||||||
goto winClipboardProc_Done;
|
goto winClipboardProc_Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize retry count */
|
|
||||||
iRetries = 0;
|
|
||||||
|
|
||||||
|
|
||||||
/* Open the X display */
|
|
||||||
do {
|
|
||||||
pDisplay = XOpenDisplay(szDisplay);
|
|
||||||
if (pDisplay == NULL) {
|
|
||||||
ErrorF("winClipboardProc - Could not open display, "
|
|
||||||
"try: %d, sleeping: %d\n", iRetries + 1, WIN_CONNECT_DELAY);
|
|
||||||
++iRetries;
|
|
||||||
sleep(WIN_CONNECT_DELAY);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
while (pDisplay == NULL && iRetries < WIN_CONNECT_RETRIES);
|
|
||||||
|
|
||||||
/* Make sure that the display opened */
|
/* Make sure that the display opened */
|
||||||
|
pDisplay = XOpenDisplay(szDisplay);
|
||||||
if (pDisplay == NULL) {
|
if (pDisplay == NULL) {
|
||||||
ErrorF("winClipboardProc - Failed opening the display, giving up\n");
|
ErrorF("winClipboardProc - Failed opening the display, giving up\n");
|
||||||
goto winClipboardProc_Done;
|
goto winClipboardProc_Done;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user