diff options
author | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
commit | 6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (patch) | |
tree | 21e1af7ee94600e349ae21353dc11963a06e988d /xorg-server/os | |
parent | 75f57cf199b6c042b0f7515e3a1ab80f7ccecfab (diff) | |
parent | d137057fd13e83ec15ab416c7fe774741da06047 (diff) | |
download | vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.gz vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.bz2 vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/Xext/shm.c
xorg-server/Xext/sync.c
xorg-server/Xext/xf86bigfont.c
xorg-server/Xi/opendev.c
xorg-server/dix/dispatch.c
xorg-server/include/globals.h
xorg-server/mi/miinitext.c
Diffstat (limited to 'xorg-server/os')
-rw-r--r-- | xorg-server/os/connection.c | 2 | ||||
-rw-r--r-- | xorg-server/os/io.c | 12 | ||||
-rw-r--r-- | xorg-server/os/osinit.c | 1 | ||||
-rw-r--r-- | xorg-server/os/utils.c | 18 |
4 files changed, 24 insertions, 9 deletions
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c index 50ed4ae69..f34cc3ea3 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -929,7 +929,7 @@ ErrorConnMax(XtransConnInfo trans_conn) { int fd = _XSERVTransGetConnectionNumber(trans_conn); xConnSetupPrefix csp; - char pad[3]; + char pad[3] = { 0, 0, 0 }; struct iovec iov[3]; char byteOrder = 0; int whichbyte = 1; diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c index 84757294b..9ccfdba62 100644 --- a/xorg-server/os/io.c +++ b/xorg-server/os/io.c @@ -578,8 +578,6 @@ ResetCurrentRequest(ClientPtr client) } } -static const int padlength[4] = { 0, 3, 2, 1 }; - /******************** * FlushAllOutput() * Flush all clients with output. However, if some client still @@ -757,7 +755,7 @@ WriteToClient(ClientPtr who, int count, const void *__buf) oc->output = oco; } - padBytes = padlength[count & 3]; + padBytes = padding_for_int32(count); if (ReplyCallback) { ReplyInfoRec replyinfo; @@ -815,7 +813,11 @@ WriteToClient(ClientPtr who, int count, const void *__buf) NewOutputPending = TRUE; FD_SET(oc->fd, &OutputPending); memmove((char *) oco->buf + oco->count, buf, count); - oco->count += count + padBytes; + oco->count += count; + if (padBytes) { + memset(oco->buf + oco->count, '\0', padBytes); + oco->count += padBytes; + } return count; } @@ -846,7 +848,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) if (!oco) return 0; written = 0; - padsize = padlength[extraCount & 3]; + padsize = padding_for_int32(extraCount); notWritten = oco->count + extraCount + padsize; todo = notWritten; while (notWritten) { diff --git a/xorg-server/os/osinit.c b/xorg-server/os/osinit.c index c2cff757b..8a959a39c 100644 --- a/xorg-server/os/osinit.c +++ b/xorg-server/os/osinit.c @@ -291,6 +291,7 @@ OsInit(void) } TimerInit(); OsVendorInit(); + OsResetSignals(); /* * No log file by default. OsVendorInit() should call LogInit() with the * log file name if logging to a file is desired. diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index d61a9d67d..b1bd5ce94 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -138,7 +138,6 @@ Bool noDPMSExtension = FALSE; #endif #ifdef GLXEXT Bool noGlxExtension = FALSE; -Bool noGlxVisualInit = FALSE; #endif #ifdef SCREENSAVER Bool noScreenSaverExtension = FALSE; @@ -785,8 +784,8 @@ ProcessCommandLine(int argc, char *argv[]) else if (strcmp(argv[i], "-nolisten") == 0) { if (++i < argc) { if (_XSERVTransNoListen(argv[i])) - FatalError("Failed to disable listen for %s transport", - argv[i]); + ErrorF("Failed to disable listen for %s transport", + argv[i]); } else UseMsg(); @@ -1302,6 +1301,19 @@ OsReleaseSignals(void) #endif } +void +OsResetSignals(void) +{ +#ifdef SIG_BLOCK + while (BlockedSignalCount > 0) + OsReleaseSignals(); +#ifdef SIGIO + while (sigio_blocked > 0) + OsReleaseSIGIO(); +#endif +#endif +} + /* * Pending signals may interfere with core dumping. Provide a * mechanism to block signals when aborting. |