Commit 47796167 authored by Reinhard Tartler's avatar Reinhard Tartler

Imported nxcomp-3.4.0-6.tar.gz

Summary: Imported nxcomp-3.4.0-6.tar.gz Keywords: Imported nxcomp-3.4.0-6.tar.gz into Git repository
parent 799bf672
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -17,6 +17,7 @@
#include "Misc.h"
#include "Unpack.h"
#include "Alpha.h"
#define PANIC
#define WARNING
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -268,7 +268,7 @@ int Auth::getCookie()
snprintf(line, DEFAULT_STRING_LIMIT, "%.200s", display_);
}
char *parameters[256];
const char *parameters[256];
parameters[0] = command;
parameters[1] = command;
......@@ -295,7 +295,7 @@ int Auth::getCookie()
// implementation.
//
FILE *data = Popen(parameters, "r");
FILE *data = Popen((char *const *) parameters, "r");
int result = -1;
......@@ -342,7 +342,21 @@ int Auth::getCookie()
<< "'.\n" << logofs_flush;
#endif
if (sscanf(line, "%*s %*s %511s", realCookie_) != 1)
//
// Skip the hostname in the authority entry
// just in case it includes some white spaces.
//
char *cookie = NULL;
cookie = index(line, ':');
if (cookie == NULL)
{
cookie = line;
}
if (sscanf(cookie, "%*s %*s %511s", realCookie_) != 1)
{
#ifdef PANIC
*logofs << "Auth: PANIC! Failed to identify the cookie "
......@@ -499,7 +513,7 @@ int Auth::checkCookie(unsigned char *buffer)
return -1;
}
char *protoName = "MIT-MAGIC-COOKIE-1";
const char *protoName = "MIT-MAGIC-COOKIE-1";
int protoSize = strlen(protoName);
int matchedProtoSize;
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
ChangeLog:
nxcomp-3.4.0-6
- Solved compilation problems on Solaris.
nxcomp-3.4.0-5
- Solved compilation problems on GCC 4.4.
nxcomp-3.4.0-4
- Added reference to fixed TR02H02325.
nxcomp-3.4.0-3
- Updated copyright to year 2010.
nxcomp-3.4.0-2
- Fixed TR03G02204. Changed the parsing of X authority entries in
order to handle the case where the hostname includes white spaces.
- Fixed TR02H02325. Bug in PNG decompression on 16bpp displays.
nxcomp-3.4.0-1
- Opened the 3.4.0 branch based on nxcomp-3.3.0-4.
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -2037,10 +2037,10 @@ Split *Channel::handleSplitCommitRemove(int request, int resource, int position)
<< ".\n" << logofs_flush;
#endif
if (control -> isProtoStep7() == 1 &&
if ((control -> isProtoStep7() == 1 &&
(resource != split -> getResource() ||
request != split -> getRequest() ||
position != split -> getPosition()) ||
position != split -> getPosition())) ||
(request != split -> getRequest() ||
position != split -> getPosition()))
{
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -498,9 +498,9 @@ class Channel
int canCleanStore(MessageStore *store)
{
return (store -> getSize() > 0 && (store -> getRemoteStorageSize() >
return ((store -> getSize() > 0 && (store -> getRemoteStorageSize() >
(control -> RemoteTotalStorageSize / 100 * store ->
cacheLowerThreshold)) || (store -> getLocalStorageSize() >
cacheLowerThreshold))) || (store -> getLocalStorageSize() >
(control -> LocalTotalStorageSize / 100 * store ->
cacheLowerThreshold)));
}
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -69,7 +69,8 @@ extern void InstallSignals();
extern char *GetClientPath();
extern int CheckParent(char *name, char *type, int parent);
extern int CheckParent(const char *name, const char *type,
int parent);
#ifdef __sun
extern char **environ;
......@@ -81,19 +82,23 @@ extern char **environ;
// have been disabled in the main process.
//
static void SystemCleanup(char *name);
static void SystemCleanup(const char *name);
//
// Release all objects allocated in the
// heap.
static void MemoryCleanup(char *name);
static void MemoryCleanup(const char *name);
//
// Remove 'name' from the environment.
//
static int UnsetEnv(char *name);
static int UnsetEnv(const char *name);
static int NXTransKeeperHandler(int signal);
static void NXTransKeeperCheck();
//
// Start a nxclient process in dialog mode.
......@@ -926,7 +931,7 @@ int NXTransKeeper(int caches, int images, const char *root)
exit(0);
}
void SystemCleanup(char *name)
void SystemCleanup(const char *name)
{
#ifdef TEST
*logofs << name << ": Performing system cleanup in process "
......@@ -942,7 +947,7 @@ void SystemCleanup(char *name)
InstallSignals();
}
void MemoryCleanup(char *name)
void MemoryCleanup(const char *name)
{
#ifdef TEST
*logofs << name << ": Performing memory cleanup in process "
......@@ -977,7 +982,7 @@ void MemoryCleanup(char *name)
EnableSignals();
}
int UnsetEnv(char *name)
int UnsetEnv(const char *name)
{
int result;
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -5646,9 +5646,9 @@ int ClientChannel::handleSplitChecksum(EncodeBuffer &encodeBuffer, T_checksum ch
// persistent image cache is enabled.
//
if (control -> ImageCacheEnableLoad == 1 ||
control -> ImageCacheEnableSave == 1 &&
enableLoad_ == 1 || enableSave_ == 1)
if ((control -> ImageCacheEnableLoad == 1 ||
control -> ImageCacheEnableSave == 1) &&
(enableLoad_ == 1 || enableSave_ == 1))
{
encodeBuffer.encodeBoolValue(1);
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -17,6 +17,7 @@
#include "Misc.h"
#include "Unpack.h"
#include "Colormap.h"
#define PANIC
#define WARNING
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -17,6 +17,7 @@
#include <unistd.h>
#include "Fork.h"
#include "Misc.h"
#include "Timestamp.h"
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -20,4 +20,4 @@
// often on Cygwin.
//
int Fork();
extern int Fork();
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -91,6 +91,8 @@ static int DecompressJpeg24(unsigned char *compressedData, int compressedLen,
static int DecompressJpeg32(unsigned char *compressedData, int compressedLen,
unsigned int w, unsigned int h, unsigned char *dstBuf, int byteOrder);
void UnpackJpegErrorHandler(j_common_ptr cinfo);
//
// Colormap stuff.
//
......@@ -142,8 +144,8 @@ int UnpackJpeg(T_geometry *geometry, unsigned char method, unsigned char *srcDat
// Check if data is coming from a failed unsplit.
//
if (srcSize < 2 || srcData[0] == SPLIT_PATTERN &&
srcData[1] == SPLIT_PATTERN)
if (srcSize < 2 || (srcData[0] == SPLIT_PATTERN &&
srcData[1] == SPLIT_PATTERN))
{
#ifdef WARNING
*logofs << "UnpackJpeg: WARNING! Skipping unpack of dummy data.\n"
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
Copyright (c) 2001, 2009 NoMachine - http://www.nomachine.com/.
Copyright (c) 2001, 2010 NoMachine - http://www.nomachine.com/.
NXCOMP library and NX extensions to X are copyright of NoMachine.
Redistribution and use of this software is allowed according to the
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -354,7 +354,7 @@ static int HandleChild(int child);
static int CheckChild(int pid, int status);
static int WaitChild(int child, const char *label, int force);
int CheckParent(char *name, char *type, int parent);
int CheckParent(const char *name, const char *type, int parent);
void RegisterChild(int child);
......@@ -1514,9 +1514,9 @@ int NXTransClose(int fd)
* end of the socket pair.
*/
if (control != NULL && (agent != NULL &&
if (control != NULL && ((agent != NULL &&
(fd == agentFD[0] || fd == NX_FD_ANY)) ||
(fd == proxyFD || fd == NX_FD_ANY))
(fd == proxyFD || fd == NX_FD_ANY)))
{
if (proxy != NULL)
{
......@@ -1551,9 +1551,9 @@ int NXTransDestroy(int fd)
logofs = &cerr;
}
if (control != NULL && (agent != NULL &&
if (control != NULL && ((agent != NULL &&
(fd == agentFD[0] || fd == NX_FD_ANY)) ||
(fd == proxyFD || fd == NX_FD_ANY))
(fd == proxyFD || fd == NX_FD_ANY)))
{
//
// Shut down the X connections and
......@@ -6396,7 +6396,7 @@ void RegisterChild(int child)
lastChild = child;
}
int CheckParent(char *name, char *type, int parent)
int CheckParent(const char *name, const char *type, int parent)
{
if (parent != getppid() || parent == 1)
{
......@@ -9995,8 +9995,8 @@ char *GetLastCache(char *listBuffer, const char *searchPath)
*selectedName = '\0';
char *localPrefix;
char *remotePrefix;
const char *localPrefix;
const char *remotePrefix;
if (control -> ProxyMode == proxy_client)
{
......@@ -10979,7 +10979,7 @@ int ParsePackOption(const char *opt)
packMethod == PACK_LOSSLESS ||
packMethod == PACK_ADAPTIVE)
{
char *dash = rindex(opt, '-');
const char *dash = rindex(opt, '-');
if (dash != NULL && strlen(dash) == 2 &&
*(dash + 1) >= '0' && *(dash + 1) <= '9')
......@@ -13927,7 +13927,7 @@ void PrintProcessInfo()
<< "." << control -> LocalVersionMinor << "."
<< control -> LocalVersionPatch << "\n\n";
cerr << "Copyright (C) 2001, 2007 NoMachine.\n"
cerr << "Copyright (C) 2001, 2010 NoMachine.\n"
<< "See http://www.nomachine.com/ for more information.\n\n";
}
......@@ -14080,8 +14080,8 @@ void PrintConnectionInfo()
}
if (control -> ProxyMode == proxy_client &&
useUnixSocket > 0 || useTcpSocket > 0 ||
useAgentSocket > 0)
(useUnixSocket > 0 || useTcpSocket > 0 ||
useAgentSocket > 0))
{
cerr << "Info" << ": Listening to X11 connections "
<< "on display ':" << xPort << "'.\n";
......@@ -15764,8 +15764,8 @@ static void handleAlertInLoop()
int replace = 1;
int local = 1;
char *message;
char *type;
const char *message;
const char *type;
switch (lastAlert.code)
{
......@@ -16218,7 +16218,7 @@ static inline void handleReadableInLoop(int &resultFDs, fd_set &readSet)
{
T_channel_type type = channel_none;
char *label = NULL;
const char *label = NULL;
int domain = -1;
int fd = -1;
......
############################################################################
# #
# Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. #
# Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. #
# #
# NXCOMP, NX protocol compression and NX extensions to this software #
# are copyright of NoMachine. Redistribution and use of the present #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment