aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/os')
-rw-r--r--nx-X11/programs/Xserver/os/connection.c13
-rw-r--r--nx-X11/programs/Xserver/os/log.c11
-rw-r--r--nx-X11/programs/Xserver/os/utils.c4
-rw-r--r--nx-X11/programs/Xserver/os/xdmauth.c8
4 files changed, 15 insertions, 21 deletions
diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c
index fd9741389..78ed47f1d 100644
--- a/nx-X11/programs/Xserver/os/connection.c
+++ b/nx-X11/programs/Xserver/os/connection.c
@@ -72,9 +72,15 @@ SOFTWARE.
#endif
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
-#define XSERV_t
-#define TRANS_SERVER
-#define TRANS_REOPEN
+#ifndef XSERV_t
+# define XSERV_t
+#endif
+#ifndef TRANS_SERVER
+# define TRANS_SERVER
+#endif
+#ifndef TRANS_REOPEN
+# define TRANS_REOPEN
+#endif
#include <nx-X11/Xtrans/Xtrans.h>
#include <errno.h>
#include <signal.h>
@@ -682,7 +688,6 @@ ClientAuthorized(ClientPtr client,
XID auth_id;
char *reason = NULL;
XtransConnInfo trans_conn;
- int restore_trans_conn = 0;
priv = (OsCommPtr)client->osPrivate;
trans_conn = priv->trans_conn;
diff --git a/nx-X11/programs/Xserver/os/log.c b/nx-X11/programs/Xserver/os/log.c
index d97317819..d8640b5fd 100644
--- a/nx-X11/programs/Xserver/os/log.c
+++ b/nx-X11/programs/Xserver/os/log.c
@@ -107,6 +107,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <stdlib.h> /* for malloc() */
#include <errno.h>
+#include "input.h"
#include "site.h"
#include "opaque.h"
@@ -561,15 +562,6 @@ VAuditF(const char *f, va_list args)
prefix = AuditPrefix();
len = vsnprintf(buf, sizeof(buf), f, args);
-#if 1
- /* XXX Compressing duplicated messages is temporarily disabled to
- * work around bugzilla 964:
- * https://freedesktop.org/bugzilla/show_bug.cgi?id=964
- */
- ErrorF("%s%s", prefix != NULL ? prefix : "", buf);
- oldlen = -1;
- nrepeat = 0;
-#else
if (len == oldlen && strcmp(buf, oldbuf) == 0) {
/* Message already seen */
nrepeat++;
@@ -583,7 +575,6 @@ VAuditF(const char *f, va_list args)
nrepeat = 0;
auditTimer = TimerSet(auditTimer, 0, AUDIT_TIMEOUT, AuditFlush, NULL);
}
-#endif
if (prefix != NULL)
free(prefix);
}
diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c
index f5f09c320..43d92ed98 100644
--- a/nx-X11/programs/Xserver/os/utils.c
+++ b/nx-X11/programs/Xserver/os/utils.c
@@ -411,7 +411,9 @@ LockServer(void)
if (lfd < 0)
FatalError("Could not create lock file in %s\n", tmp);
(void) sprintf(pid_str, "%10ld\n", (long)getpid());
- (void) write(lfd, pid_str, 11);
+ if (write(lfd, pid_str, 11) != 11)
+ FatalError("Could not write pid to lock file in %s\n", tmp);
+
#ifndef __UNIXOS2__
#ifndef USE_CHMOD
(void) fchmod(lfd, 0444);
diff --git a/nx-X11/programs/Xserver/os/xdmauth.c b/nx-X11/programs/Xserver/os/xdmauth.c
index a89c5b0c0..c2796fba1 100644
--- a/nx-X11/programs/Xserver/os/xdmauth.c
+++ b/nx-X11/programs/Xserver/os/xdmauth.c
@@ -70,9 +70,7 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
XdmcpUnwrap (incomingData->data, &privateKey,
incomingData->data,incomingData->length);
- switch (packet_type)
- {
- case ACCEPT:
+ if (packet_type == ACCEPT) {
if (incomingData->length != 8)
return FALSE;
incoming = (XdmAuthKeyPtr) incomingData->data;
@@ -88,9 +86,7 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
{
outgoingData->length = 0;
outgoingData->data = 0;
- switch (packet_type)
- {
- case REQUEST:
+ if (packet_type == REQUEST) {
if (XdmcpAllocARRAY8 (outgoingData, 8))
XdmcpWrap (&rho, &privateKey, outgoingData->data, 8);
}