aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-16 00:19:38 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-16 00:19:38 +0100
commitb66699555d2e2503926f01a9c192481e01812399 (patch)
treefa7f275b0bc74c3ed8e85538602ed8b6a8a0f4c2
parent3523d15e2a9f84e2136e3370129a9bea0e16e072 (diff)
parent97a69b95ac3018f9a8838b09df28a0f33c484a0d (diff)
downloadnx-libs-b66699555d2e2503926f01a9c192481e01812399.tar.gz
nx-libs-b66699555d2e2503926f01a9c192481e01812399.tar.bz2
nx-libs-b66699555d2e2503926f01a9c192481e01812399.zip
Merge branch 'uli42-pr/various6' into 3.6.x
Attributes GH PR #979: https://github.com/ArcticaProject/nx-libs/pull/979
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Atoms.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.h7
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c23
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GC.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c7
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c1
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXpicture.c13
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Rootless.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Split.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/man/nxagent.112
-rw-r--r--nxcomp/include/NX.h2
-rw-r--r--nxcomp/src/Control.h2
-rw-r--r--nxcomp/src/Message.h2
-rw-r--r--nxproxy/man/nxproxy.12
18 files changed, 51 insertions, 42 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index d5d13ea56..f24d15c55 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -2319,7 +2319,7 @@ void nxagentSetDeferLevel(void)
nxagentChangeOption(Streaming, False);
}
- switch (nxagentOption(LinkType))
+ switch (nxagentOption(LinkType))
{
case LINK_TYPE_MODEM:
case LINK_TYPE_ISDN: { deferLevel = 2; tileWidth = 64; tileHeight = 64; break; }
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.h b/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
index a39c53c07..9006b2253 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.h
@@ -58,7 +58,7 @@ void nxagentWMDetect(void);
#ifdef XlibAtom
/*
- * only provide these protoypes if the including file knows about Xlib
+ * only provide these prototypes if the including file knows about Xlib
* types. This allows us including Atoms.h without having to use the
* Xlib type magic of Agent.h
*/
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.h b/nx-X11/programs/Xserver/hw/nxagent/Client.h
index ac2f34e8b..574466602 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.h
@@ -44,10 +44,15 @@ enum ClientHint
JAVA_WINDOW
};
+/* client byte counting is currently unused */
+#undef COUNT_CLIENT_BYTES
+
typedef struct _PrivClientRec
{
int clientState;
+#ifdef COUNT_CLIENT_BYTES
long clientBytes;
+#endif
enum ClientHint clientHint;
char *clientInfoString;
} PrivClientRec;
@@ -59,8 +64,6 @@ extern int nxagentClientPrivateIndex;
extern void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, void *args);
-#undef COUNT_CLIENT_BYTES
-
#ifdef COUNT_CLIENT_BYTES
#define nxagentClientAddBytes(pClient, size) \
(nxagentClientPriv(pClient) -> clientBytes += (size))
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 15112312f..659355501 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -758,18 +758,17 @@ static void nxagentDisplayFlushHandler(Display *disp, int length)
}
/*
- * From the changelog for nx-X11-3.0.0-4:
- * "Added the _NXDisplayErrorPredicate function in XlibInt.c. It is
- * actually a pointer to a function called whenever Xlib is going to
- * perform a network operation. If the function returns true, the
- * call will be aborted and Xlib will return the control to the ap-
- * plication. It is up to the application to set the XlibDisplayIO-
- * Error flag after the _NXDisplayErrorPredicate returns true. The
- * function can be used to activate additional checks, besides the
- * normal failures detected by Xlib on the display socket. For exam-
- * ple, the application can set the funciton to verify if an inter-
- * rupt was received or if any other event occurred mandating the
- + end of the session."
+ * From the changelog for nx-X11-3.0.0-4: "Added the
+ * _NXDisplayErrorPredicate function in XlibInt.c. It is actually a
+ * pointer to a function called whenever Xlib is going to perform a
+ * network operation. If the function returns true, the call will be
+ * aborted and Xlib will return the control to the application. It is
+ * up to the application to set the XlibDisplayIO- Error flag after
+ * the _NXDisplayErrorPredicate returns true. The function can be used
+ * to activate additional checks, besides the normal failures detected
+ * by Xlib on the display socket. For example, the application can set
+ * the function to verify if an interrupt was received or if any other
+ * event occurred mandating the end of the session."
*/
static int nxagentDisplayErrorPredicate(Display *disp, int error)
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index a9a79cebd..8e2313eac 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -131,8 +131,6 @@
extern Bool nxagentOnce;
-extern WindowPtr nxagentRootTileWindow;
-
extern int nxagentLastClipboardClient;
#ifdef NX_DEBUG_INPUT
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c
index 2aa404910..b956bb8df 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GC.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c
@@ -1127,7 +1127,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
/*
* Originally, the clip origin area were 0,0 but it didn't
* work with kedit and family, because it got the clip mask of
- * the pixmap all traslated.
+ * the pixmap all translated.
*/
XSetClipRectangles(nxagentDisplay, nxagentGC(pGC), pGC -> clipOrg.x, pGC -> clipOrg.y,
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index d00b13d77..639e3429e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -123,6 +123,9 @@ Bool nxagentXdmcpAlertUp = False;
int nxagentBuffer;
Bool nxagentBlocking;
+
+/* FIXME: nxagentCongestion is checked as a Boolean and as an Integer
+ (>= 4) at the same time which is weird at least */
int nxagentCongestion;
double nxagentBytesIn;
@@ -1017,7 +1020,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out)
nxagentDispatch.in = nxagentBytesIn;
nxagentDispatch.out = nxagentBytesOut;
- isItTimeToYield = 1;
+ isItTimeToYield = TRUE;
}
#ifdef DEBUG
else
@@ -1126,7 +1129,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out)
nxagentDispatch.in = nxagentBytesIn;
nxagentDispatch.out = nxagentBytesOut;
- isItTimeToYield = 1;
+ isItTimeToYield = TRUE;
}
#ifdef DEBUG
else
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index 12a44dbe0..a8739fa3f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -581,7 +581,6 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
}
saveAgentState("TERMINATED");
- nxagentFreeAtomMap();
nxagentFreeFontData();
#endif /* NXAGENT_SERVER */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
index 159a7b55d..2a307b0f7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
@@ -531,13 +531,12 @@ void nxagentReconnectPictFormat(void *p0, XID x1, void *p2)
}
/*
- * The set of picture formats may change considerably
- * between different X servers. This poses a problem
- * while migrating NX sessions, because a requisite to
- * successfully reconnect the session is that all pic-
- * ture formats have to be available on the new X server.
- * To reduce such problems, we use a limited set of
- * pictures available on the most X servers.
+ * The set of picture formats may change considerably between
+ * different X servers. This poses a problem while migrating NX
+ * sessions, because a requisite to successfully reconnect the session
+ * is that all picture formats have to be available on the new X
+ * server. To reduce such problems, we use a limited set of pictures
+ * available on the most X servers.
*/
void nxagentPictureCreateDefaultFormats(ScreenPtr pScreen, FormatInitRec *formats, int *nformats)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
index 3bd0b7c25..65d0f4218 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
@@ -1244,7 +1244,7 @@ void nxagentFreePropertyList(void)
/*
* We are trying to distinguish notifications generated by an external
- * client from those genarated by our own requests.
+ * client from those generated by our own requests.
*/
Bool nxagentNotifyMatchChangeProperty(void *p)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 86f88bb7b..d09c14692 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -2514,9 +2514,9 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
if (nxagentKeyboard != NULL)
{
int i;
- for (i = 0; nxagentKeyboard[i] != '/' && nxagentKeyboard[i] != 0; i++);
+ for (i = 0; nxagentKeyboard[i] != '/' && nxagentKeyboard[i] != '\0'; i++);
- if(nxagentKeyboard[i] == 0 || nxagentKeyboard[i + 1] == 0 || i == 0)
+ if(nxagentKeyboard[i] == '\0' || nxagentKeyboard[i + 1] == '\0' || i == 0)
{
#ifdef WARNING
fprintf(stderr,"WARNING! Wrong keyboard type: %s.\n", nxagentKeyboard);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.c b/nx-X11/programs/Xserver/hw/nxagent/Split.c
index 2e2b130fe..99cc3a280 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Split.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Split.c
@@ -112,7 +112,7 @@ SplitResourcePtr nxagentAllocSplitResource(void)
fprintf(stderr, "nxagentAllocSplitResource: PANIC! No more resources for the next split.\n");
#endif
/*
-FIXME: Must deal with the case all resources are exausted.
+FIXME: Must deal with the case all resources are exhausted.
*/
FatalError("nxagentAllocSplitResource: PANIC! No more resources for the next split.\n");
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index a30eac589..e1a0776ad 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -110,8 +110,6 @@ extern WindowPtr nxagentViewportFrameRight;
extern WindowPtr nxagentViewportFrameAbove;
extern WindowPtr nxagentViewportFrameBelow;
-extern WindowPtr nxagentRootTileWindow;
-
extern Bool nxagentReportPrivateWindowIds;
#define RECTLIMIT 25
@@ -1532,7 +1530,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
* position in the window tree, and pPriorParent is its previous
* parent. This function can be NULL.
*
- * We simply pass this pver to the real X server.
+ * We simply pass this over to the real X server.
*/
void nxagentReparentWindow(WindowPtr pWin, WindowPtr pOldParent)
{
@@ -3907,7 +3905,7 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId)
}
}
- #ifdef WARNING
+ #ifdef TEST
fprintf(stderr, "%s: WARNING! Item not found.\n", __func__);
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
index 111224264..72a885638 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
+++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
@@ -539,7 +539,9 @@ allowed to change the keyboard settings through XKEYBOARD.
.TP 8
.B \-tile WxH
maximum size of the tile used when sending an image to the remote
-display (minimum allowed: 32x32; no default)
+display (minimum allowed: 32x32). The default depends on the link
+type: 64x64 for \fImodem\fR and \fIisdn\fR, 4096x4096 for all other
+link types)
.TP 8
.B \-irlimit
maximum image data rate to the encoder input in kB/s. The default is no limit.
@@ -755,21 +757,29 @@ The default value can be set via the command line (\-defer). The value
provided as nx/nx option is set when resuming a session, thus it
overrides the command line default.
+The default depends on the link type (see man nxproxy).
+
Each defer level adds the following rules to the previous ones:
.RS 8
.TP 8
.I 0
Eager encoding.
+
+Default for link speed \fIlan\fR and \fIlocal\fR.
.TP 8
.I 1
No data is put or copied on pixmaps, marking them always as corrupted
and synchronizing them on demand, i.e. when a copy area to a window is
requested, the source is synchronized before copying it.
+
+Default for link speed \fIwan\fR.
.TP 8
.I 2
The put images over the windows are skipped marking the destination as
corrupted. The same happens for copy area and composite operations,
spreading the corrupted regions of involved drawables.
+
+Default for link speed \fIadsl\fR, \fIisdn\fR and \fImodem\fR.
.RE
.TP 8
diff --git a/nxcomp/include/NX.h b/nxcomp/include/NX.h
index cc1cfb280..088e265e0 100644
--- a/nxcomp/include/NX.h
+++ b/nxcomp/include/NX.h
@@ -342,7 +342,7 @@ extern int NXTransFlush(int fd);
* connection.
*
* NX_CHANNEL_SLAVE: The channel will forward data to a remote slave
- * command (see NX_SLAVE_CMD envrionment variable)
+ * command (see NX_SLAVE_CMD environment variable)
*
* Only a proxy running at the NX server/X client side will be able
* to create a X, CUPS, SMB, MEDIA and HTTP channel. A proxy running
diff --git a/nxcomp/src/Control.h b/nxcomp/src/Control.h
index 764fca2c1..21edae77c 100644
--- a/nxcomp/src/Control.h
+++ b/nxcomp/src/Control.h
@@ -144,7 +144,7 @@ class Control
T_session_mode SessionMode;
//
- // Either immediate or defferred flushes.
+ // Either immediate or deferred flushes.
//
T_flush_policy FlushPolicy;
diff --git a/nxcomp/src/Message.h b/nxcomp/src/Message.h
index 30883f101..f3a588104 100644
--- a/nxcomp/src/Message.h
+++ b/nxcomp/src/Message.h
@@ -566,7 +566,7 @@ class MessageStore
// it can contain valid data that must be
// explicitly deallocated if not needed.
// Note also that you cannot count on the
- // initialization made in costructor.
+ // initialization made in constructor.
//
temporary_ = message;
diff --git a/nxproxy/man/nxproxy.1 b/nxproxy/man/nxproxy.1
index 9a145d2c0..c22f15a48 100644
--- a/nxproxy/man/nxproxy.1
+++ b/nxproxy/man/nxproxy.1
@@ -109,7 +109,7 @@ Remote port used for the connection.
.TP 8
.B retry=<int>
-Number of connection atempts.
+Number of connection attempts.
.TP 8
.B root=<string>