ChangeLog:

nxcomp-1.5.0-65

- Removed the warning issued on parsing the agent option 'rootless'.
  Solves the TR08C00959.

- MacOSX 10.4 defines socklen_t. Made the definition conditional so
  that we can still support older versions. Solves the TR07C00926.

- Updated the ChangeLog to include references to the solved TRs.

nxcomp-1.5.0-64

- Imported the 1.6.0 changes in the maintenance 1.5.0.

- Removed a wrong assertion that might cause the session to fail
  when the software was compiled with TEST enabled in Proxy.cpp.

- The nxclient dialog process is signaled with SIGKILL on Windows,
  as the SIGTERM is ignored. This solves the TR07C00929.

- Ensured the JPEG error flag is always set before jumping out of
  the Jpeg decompression.

- Skipped errors encontered setting the TCP_NODELAY flag on Mac.
  Solves TR08C00940.

- Few cosmetic changes.

nxcomp-1.5.0-63

- Ensured that the parent is checked often in the keeper process,
  so that, in the case of a premature death, the child is exited
  earlier.

nxcomp-1.5.0-62

- Some performance tuning of the LAN and WAN link modes.

nxcomp-1.5.0-61

- Fixed the problems arisen with loading or saving the image files
  on Windows by forcing the streams to be opened in binary mode.
  These problems have been triggered by the recent Cygwin upgrade.

- Removed the logs that had be left enabled for test purposes.

nxcomp-1.5.0-60

- Made all errors encountered while unpacking an image just print
  a warning in the session log. Such errors are not fatal but the
  client monitors the state of the session at startup, so that by
  marking image decompression errors as such may cause the session
  to be aborted.

- Marked as warnings also errors encountered by trying to load an
  image from disk.

nxcomp-1.5.0-59

- When detected, the CTRL+ALT+SHIFT+ESC sequence is removed from
  the event stream.

- Also modified the message in the session log to issue a warning,
  instead of an error.

nxcomp-1.5.0-58

- Added a setjmp() before yielding the control to the JPEG library.
  This makes possible to recover from the JPEG decompression errors
  that were previously fatal.

- In the commit split request, the client id is now encoded by the
  client channel beside the propagate flag. The client id is igno-
  red by the decoding party. As in the old protocol versions, the
  committing client is taken from the client id that was originally
  sent together with the packed image.

- Fixed the compilation problem when defining OPCODES in Misc.cpp.

- Skipped the synchronous flush of the proxy link when connecting
  to a previous NX version.

- Ensured that the new alerts are only requested when connected to
  a compatible proxy.

- Ignored the option 'fullscreen', targeting the agents.

nxcomp-1.5.0-57

- Added more alerts and changed the name of those dealing with the
  resume of a session.

- Added the MIXED define. When set, the proxy will let all logs go
  to the standard error. This is useful to interleave the Xlib log
  output with the proxy output in a single file.

- Added a new alert to report an I/O error at agent reconnection.
  This is one of those alert that can't be actually shown, but are
  included to offer a consistent view to the agent implementation.

nxcomp-1.5.0-56

- Added the split mode NXSplitModeSync. By selecting this mode,
  the proxy will try to empty the split store immediately, until
  all messages marked in such mode will be synchronized. The im-
  plementation is left to future versions.

  #define NXSplitModeSync     3

- Added the messages specific to RDP and VNC sessions in NXalert.h.
  Included are also a few alerts related to changes to the color
  depth and desktop geometry that may be eventually mandated by the
  remote server.

- Corrected a typo in NXalert.h

nxcomp-1.5.0-55

- Added the 'mode' field in the X_NXStartSplit request. It determi-
  nes the strategy that the proxy will adopt to handle the image.
  If set to 'eager', the proxy will only split the messages whose
  size exceeds the split threshold (the threshold can be found in
  the X_NXGetControlParameters reply). If mode is set to lazy, the
  proxy will split any image that it is not able to find in its
  cache.

  The opcode and the two available modes are defined in NXproto.h,
  currently:

  #define NXSplitModeDefault  0
  #define NXSplitModeEager    1
  #define NXSplitModeLazy     2

- All requests related to image streaming now carry a 'resource' id.
  The id is currently ignored by the proxy in the case of X_NXCom-
  mitSplit requests.

- Added a new NXSetSplitMode() request. It determines the strategy
  that the proxy will adopt to stream the images. If set to 'eager'
  the proxy will only split the messages whose size exceeds the
  split threshold, otherwise it will  split all the images, regard-
  less their size. This is in preparation of the lazy encoding in
  agent.

- Slightly decreased the startup timeout compared to the value it
  had in the 1.4.0. This timeout is used to retain the images used
  during session startup in the persistent cache.

nxcomp-1.5.0-54

- Modified the text of the begin-reconnection alert to mention the
  speed of the connection detected by the agent.

nxcomp-1.5.0-53

- Reworked the handling of the abort-split events issued by the re-
  remote proxy so that we now finalize the procedure and restart the
  client asynchronously, in the middle of the write loop.

nxcomp-1.5.0-52

- Rewritten the internal interface to the notification events. There
  are now five different split notification events:

  NXNoSplitNotify        The operation didn't cause any actual split.
                         The client can be immediately restarted.

  NXStartSplitNotify     A split is ongoing. The client should be
                         suspended until the end of the split.

  NXCommitSplitNotify    A complete request has been recomposed. The
                         client can commit the given request to the
                          X server.

  NXEndSplitNotify       The split operation was duly completed. The
                         client can be restarted.

  NXEmptySplitNotify     No more split operation are pending. The
                         agent can use this information to implement
                         specific strategies, requiring for example
                         that all messages have been recomposed at
                         the remote end. This can include updating
                         the drawables that were not synchronized
                         because of the lazy encoding.

- Removed the X_NXSync and X_NXKarma operations, not used anymore by
  the NX agents.

- Increasing or decreasing a timeout makes it respectively equal to
  the base timeout or to the base timeout / 4.

nxcomp-1.5.0-51

- Improved the mechanism by which synchronization replies are sent
  to the X client proxy.

- Using the leftPad field as passed by the nxagent 1.5.0-58 doesn't
  seem to work with the MIT-SHM. The workaround is to disable the
  MIT-SHM operation in the case of 1 bpp images.

- Removed the limitation on the size of the shared memory segment
  that had been introduced for test purposes.

nxcomp-1.5.0-50

- Solved compilation problem when --with-info was not given.

nxcomp-1.5.0-49

- Improved support for color matching from 15 and 16 bpp to 24 and
  32 bpp in RDP sessions.

- Solved TR05C00910. This was about "shadows" that might appear in
  RDP sessions when small elements like tooltips were drawn.

nxcomp-1.5.0-48

- Added a 'commit' field in X_NXCommitSplit request. When zero, the
  X server side proxy will unlock the message in the message store,
  without actually committing the image to the X server. The new
  field required changes to the encoding. This means that this ver-
  sion is not compatible with older 1.5.0 nxcomp releases.

- Added a new control message. This is used by NXTransFlush() to for-
  ce a roundtrip between the proxies and speed-up the handling of
  the synchronous replies.

nxcomp-1.5.0-47

- Made the timeouts dynamic, based on the user input and the current
  bitrate.

- Set the available tokens to 8. This allows for 16 KB to be sent on
  a modem before having to wait for a reply.

- Added provision for removing a dialog on the remote end. This can
  be used, for example, to get rid of a message that was displayed
  by the agent at the beginning of a lengthy operation.

- Fixed a fault that arose when trying to run the proxy on a display
  whose name began with the 'nx' string.

- Running a client or server session on a display host beginning with
  'nx' should be now possible.

- Flush is now always immediate when there is already data queued in
  the TCP socket.

nxcomp-1.5.0-46

- Created the NXalert.h header from Alert.h to share the alert codes
  with the agents. The new NXTransAlert() interface can be used to
  start an alert on the remote side.

- Created the NXTransParse*() and NXTransCleanup() wrappers.

- Temporarily using the single-dash style when passing parameters to
  nxclient until the double-dash style is fixed.

nxcomp-1.5.0-45

- Motion events are now flushed at the time the X server channel is
  sending the token reply.

- Renamed NXDialog() to NXTransDialog() and added a window ID parame-
  ter, to be used by the agent when starting the "pulldown" dialogs.

- Also renamed the other NX utility functions.

nxcomp-1.5.0-44

- Solved a bug that prevented auxiliary X connections from working
  with the agent.

- Added the missing check on the proxy pointer in HandleTimer() as
  it may be actually called before the proxy is created.

nxcomp-1.5.0-43

- Started tuning the performance. For now, the available tokens are
  set to an improbable value of 10000.

nxcomp-1.5.0-42

- Disabled the X server side remote expose events for test purposes.
  This is intended uncover the display problems introduced by the
  new handling of exposures in the X11 agent.

- Fixed some timestamp related functions to avoid rounding problems.

- Moved the timestamps of split, frame and flush from the Control
  to the Proxy class.

- Made the X server side proxy to skip updating the counters related
  to token management.

- Made also the X server side use deferred flushes.

- Modified handleFrame() to manage both pings and data frames and
  send the token before the actual write operation.

- Cleaned the pseudo-files used to load the control parameters.

- Cleaned up the FIXME's in the lower layers. More FIXME's remain in
  the frontend classes.

- Added a further counter to the statistics tracking the number of
  network writes performed on the proxy link.

nxcomp-1.5.0-41

- Now the watchdog process doesn't kill the parent. The termination
  event is determined by monitoring the child. This is advisable to
  avoid interfering with the signal handling in agent.
 
- The house-keeping process is not started if differential compres-
  sion (and thus caching of images) is disabled.

- Wait for the watchdog to terminate before starting the house-keep-
  ing process.

- Fixed the problem of gray stripes in white areas when using 15bpp
  RDP compression. This solves the TR06C00916.

- Added a log in Message.cpp to tell when an image is removed from
  the memory cache.

- Removed most of the logs. Only left the logs directly related to
  the deferred flushes.

- Removed a warning due to a missing definition in NX.h.

nxcomp-1.5.0-40

- Added the signal '12' to the set of blocked signal on Cygwin. This
  is what is delivered to the application when it tries to create a
  shared memory segment when the cygserver is not running. The call
  later returns "Operation not implemented", only useful if you have
  survived to the signal.

- Modified the configure script to not link against cygipc.

- Improved error handling in the negotiation phase.

- Reset the last signal received when aborting a connection attempt.
  Not doing that might cause a warning.

nxcomp-1.5.0-39

- Both channels and proxy can now deal with incomplete messages by
  waiting for the full data to become available. This is not going
  to work when the transport is connected to an agent that is run-
  ning in-process, so the timeout must be really small.

- Made the main loop more compact by letting a single function read
  from proxy and channels. The same change applies to writing to
  descriptors that are reported to be ready.
  
- Optimized the loop to report as ready the agent descriptors that
  have become available after the proxy execution phase. 

- Now the proxy will try to asynchronously read from its descriptor
  after having read from the channel.

- Unified the routine setting the routines setting the read and write
  descriptors and the timeouts.

- Unified the routine handling the channel events.

- Reintroduced the last ping timestamp to avoid sending more than a
  single ping every PingTimeout milliseconds.

- The cleanup procedure now waits for the watchdog and house-keeping
  processes to terminate.

- Reverted the change occurred in 1.5.0-35 about the byte-ordering
  problem in decompression of PNG and JPEG images.

- More coding about deferred flushes.

- Relevant debug logs are enabled in the main loop, in the proxy and
  in the channel classes, so use only for testing.

nxcomp-1.5.0-38

- Started the implementation of deferred writes based on the new NX
  transport.

- Solved a problem with the statistics file affecting the Windows
  platform. Basically it seems that Cygwin or the stdc++ library
  don't deal correctly with files that are reopened just after
  having unlinked them.

- Implemented support for 15 bpp RDP bitmaps.

- Added "rdpcolors" and "rdpcache" to the list of parameters that
  are ignored in ParseEnviromentOptions().

- This version has lot of logs enabled and some forced cleanups in
  the case of unexpected conditions. Avoid to use it for long-last-
  ing test sessions.

nxcomp-1.5.0-37

- Now splitting of images is fully disabled when running with link
  LAN. Previously the split was not executed by the proxy, but the
  agent was configured to send the start/end sequence.

- Added the check protecting the proxy from token underflow. In the
  previous code the check was left out to verify the conditions un-
  der which this event might be encountered.

- NXTransWrite() and NXTransWriteVector() allocate a context before
  calling handleRead(), so they can correctly return in the case of
  a cleanup.

nxcomp-1.5.0-36

- Modified the channel write loop to interleave abort split events
  between the writes to the X server socket.

nxcomp-1.5.0-35

- Solved a byte-ordering problem in decompression of PNG and JPEG
  images.

- Changed the handleToken() interface to make explicit if a token
  must be issued because of a ping.

- Small fix to prevent a warning in Jpeg.cpp when TEST is enabled.

nxcomp-1.5.0-34

- Solved a few problems introduced by the rewrite of the read loops
  in channels.

- Added definition of NXCollectInputFocusNotify.

nxcomp-1.5.0-33

- Implemented a new control flow system based on tokens exchanged bet-
  ween the proxies. When the clint side runs out of tokens it stops
  sending data until a new token is returned. Tokens are sent whenever
  the data written to the socket exceeds the amount of data set for a
  scheduled write, so the proxy is free to send a number of smaller
  frames before running out of tokens.

- The reason the new system is introduced is because the old method
  had two outstanding problems:

  - It worked very well when the proxies were directly connected,
    but couldn't reliably detect a link congestion when tunneled
    over SSH.

  - In the attempt of reducing the data queued to the TCP layer, it
    didn't leverage all the available bandwidth.

- Moved the final check on the state of the session at the end of
  execution stage, instead of the beginning. The signals sent by the
  user to request the statistics could be reset before the proxy had
  entered the right procedure.

- Added the session type 'unix-rootless', to be used for single apps
  run with the agent in rootless mode.

nxcomp-1.5.0-32

- Modified the main loop to skip the select when I/O is possible on
  any of the agent descriptors or the proxy link.

- Now the house-keeping process is allocated in the heap instead of
  the stack.

nxcomp-1.5.0-31

- The server channel now performs asynchronous reads from the display
  by interleaving them with data decoded from the remote proxy.

- Improved the handling of the memory-to-memory transport.

nxcomp-1.5.0-30

- Redesigned the handling of the congestion events to work more re-
  liably and to report the events to the remote peer earlier.

- Increased the size of the shared memory segment when the MIT-SHM
  extension is activated.

- Solved a bug that prevented the ping timeout to work as expected.

- Ensured that, when entering the main select(), neither the chan-
  nels or the proxy have pending messages in the read buffers.

- There is now only a single case where we can have pending messa-
  ges, namely in the handling of the MIT-SHM events.

- Solved a bug introduced by the 1.5.0-29 that made the proxy en-
  ter the select with a null timeout.

- Renamed LINK_TYPE_AUTO to LINK_TYPE_NONE in NXproto.h.

nxcomp-1.5.0-29

- Now encoding data from the agent descriptors happens in the same
  context as data is written to the buffer.

- Optimized the handling of the congestion events to avoid running
  further unneeded loops.

- Added timer handling utilities.

nxcomp-1.5.0-28

- Added code providing information about the reason of the failure
  encountered connecting to the local X server. This greatly helps
  when troubleshooting X authorization problems.

- On connection failure a warning message is printed in the session
  log.

- Removed the warning that was previously printed when the MIT-SHM
  extension failed to be initialized on Windows. Shared memory has
  problems on Cygwin and it currently doesn't work in NXWin.

- Reworked the message printed in the case of link failure.

nxcomp-1.5.0-27

- Solved a bug in the connection procedure introduced by 1.5.0-25.

nxcomp-1.5.0-26

- Transformed the errors printed on failure of the fork() creating
  the children into warnings. This can happen quite often on Win-
  dows, due to well known Cygwin problems. See also the ChangeLog
  entry for nxcomp 1.4.0-28. This patch closes the TRSL052278 but
  it's obviously not a long-term solution.

- Set the sticky bit when creating the '/tmp/.X11-unix' directory.

- Modified the Makefile.in to remove the *.out.* files generated by
  Valgrind.

- Updated the README files.

nxcomp-1.5.0-25

- Changed the directory where the client for the Mac is searched if
  it is not found in the system path.

- Modified Auth.cpp to use nxauth also on the Mac.

- Reworked the procedure showing the alert dialog when a timeout is
  encountered in the initial connection.

- Removed the experimental code from the official 1.5.0 branch.

nxcomp-1.5.0-24

- Implemented more experimental classes.

nxcomp-1.5.0-23

- Added the NX_SIGNAL_FORWARD action to NXTransSignal(). This can
  be used to let the proxy call the original signal handler of the
  agent after having blocked the signal.

nxcomp-1.5.0-22

- Ensured that we always have a context, even before creating the
  transport.

- Suppressed the error message printed when passing the -h option.

- Added the experimental code that is currently under development.

nxcomp-1.5.0-21

- Enabled the fake X cookie authentication. This requires checking
  the remote proxy version to verify that the server supports the
  new authorization mechanism.

- It's worth noting that the X client side proxy doesn't care which
  cookie is sent over the connection. The problem is that clients
  connecting to 1.4.0 servers don't have a method to force the ser-
  ver to use the fake cookie. This means that we have to solve the
  problem by letting the proxy check the remote version so that it
  can omit to replace the cookie when connecting to older servers.

nxcomp-1.5.0-20

- Added the NXTransCongestion() function. It returns true if proxy
  is in congestion state.

- Removed an incorrect warning that was printed when calling force()
  for the memory-to-memory transport. The agent could actually re-
  quire multiple loops to read all data queued for it.

nxcomp-1.5.0-19

- Small optimization in NXTransReadable() to run a new NXTransConti-
  nue() loop only after at least RetryTimeout milliseconds are pas-
  sed since the last call and still no data is available. This cuts
  the number of unneeded loops to 1/4th of the total, probably more,
  on faster machines.

- Added NXCollectGrabPointerNotify to NXproto.h.

nxcomp-1.5.0-18

- Minor changes to NXTransContinue().

nxcomp-1.5.0-17

- Moved respawning of a new nxclient instance in the cleanup procedu-
  re. This ensures that the respawn is executed whatever is the rea-
  son of the session shutdown.

- Added a method to force closure of a given channel in proxy.

- Removed code handling the special case triggered on Windows by the
  presence of a NX_SESSION variable in the environment.

nxcomp-1.5.0-16

- Added the NXTransSignal() function to let agents tell to the proxy
  how to handle the standard POSIX signals. Given the SIGINT signal,
  for example, the caller can specify any of the following actions.

  NX_SIGNAL_ENABLE:  A signal handler will have to be installed by
                     the library, so that it can be intercepted by
                     the proxy.

  NX_SIGNAL_DISABLE: The signal will be handled by the caller and,
                     eventually, forwarded to the proxy by calling
                     NXTransSignal() explicitly.

  NX_SIGNAL_RAISE:   The signal must be handled now, as if it had
                     been delivered by the operating system. This
                     function can be called by the agent with the
                     purpose of propagating a signal to the proxy.

  As a rule of thumb, agents should let the proxy handle SIGUSR1 and
  SIGUSR2, used for producing the NX protocol statistics, and SIGHUP,
  used for disconnecting the NX transport.

- The following signals are blocked by default upon creation of the
  NX transport:

  SIGCHLD    These signals should be always put under the control
  SIGUSR1    of the proxy. If agents are intercepting them, agents
  SIGUSR2    should later call NXTransSignal(..., NX_SIGNAL_RAISE)
  SIGHUP     to forward the signal to the proxy.

  SIGINT     These signals should be intercepted by agents. Agents
  SIGTERM    should ensure that NXTransDestroy() is called before
             exiting, to give the proxy a chance to shut down the
             NX transport.

  SIGPIPE    This signal is blocked by the proxy, but not used to
             implement any functionality. It can be handled by the
             NX agent without affecting the proxy.

  SIGALRM    This is not blocked by the proxy, but could be used
             in future.

  SIGVTALRM  These signals are not used and should not be used in
  SIGWINCH   future versions of the library.
  SIGIO
  SIGTSTP
  SIGTTIN
  SIGTTOU

- By calling NXTransSignal(..., NX_SIGNAL_DISABLE) nxcomp will res-
  tore the signal handler that was saved at the time the proxy hand-
  ler was installed. This means that you should call the function
  just after the XOpenDisplay() or any other function used to init-
  ialize the NX transport.

nxcomp-1.5.0-15

- In NXTransContinue(), if the transport is gone, return immediately,
  that is without having to wait until the NXTransSelect() timeout.

- Ensure that NXTransCreate() has a jump context, just in the case
  a subsequent operation would cause a cleanup.

nxcomp-1.5.0-14

- Solved a problem with requests left in the agent's buffer when run-
  ning the NX transport. The agent could have enqueued data to our
  side and checked the available events but requests could not be
  written to the proxy because proxy might not have had a chance to
  enter a new select. We found that this behaviour was triggered by
  _XEventsQueued, so now a new loop is forced when agent is calling
  _X11TransDataReadable. The procedure can be optimized, by avoiding
  an expensive loop when no critical I/O is pending.

- Added a few additional logs to ClientChannel and ServerChannel.

nxcomp-1.5.0-13

- Added the code handling the special cases of an user not specifying
  a proxy cookie or the case of the X authorization file not contain-
  ing a value matching the display. In the first case we'll forward
  the same cookie that was feeded to the proxy, in the second case we
  will forward to the X server a random generated cookie, similarly to
  what SSH does in this same condition.

- Rewritten the command line parser. Removed all the command line
  options parsed on behalf of nxproxy except:

  -C          Specify that nxproxy has to run on the "X client"
              side, listening for connections and impersonating
              an X server.\n\

  -S          Specify that nxproxy has to run in "X server" mode,
              thus forwarding the connections to daemons running
              on the client.\n\

  -V n.n.n    Request nxproxy to load the given nxcomp version.
              This option is only present on Solaris and Linux.

  -v          Print version information.

  host:port   Put at the end, specifies the host and port of the
              listening proxy.

  value=name  Set the NX option to the provided value.

  Multiple NX options can be specified in the DISPLAY environment or
  on the command line, by using the nx/nx,name=value notation.

- The above information is printed on the console when incurring in
  a parse error, together with a list of the available option=value
  parameters.

- Renamed the 'log' option to 'errors'. This makes sense as the de-
  fault name for the log file is actually 'errors'.

- Now the "Established X server connection" message is printed to
  the session log only after the X connection has passed the X auth-
  entication phase. This means that the NX client should become able
  to show the details of the session log whenever the session fails
  due to a cookie problem.

- When selecting the additional services without specifying a port,
  the client proxy will now automatically forward the connections to
  the corresponding well-known ports of the CUPS, SMB and HTTP servi-
  ces. Embedded X keyboard connections will be automatically forward-
  ed to the same display port used to connect to the X server. The
  user will still have to specify the port to be used for the media
  connections as we don't have a suitable well-known port.

- Starting from this version, connections to the keybd port will cre-
  ate real X connection channels. This is required to let connections
  leverage the fake authorization cookie.

- By testing the forwarding of keybd connections I found that, when
  letting X clients connect to the port, it is required to provide
  the X cookie for the unix display. Adding only the TCP cookie will
  not work. For example, by creating a cookie as in:

  xauth add localhost:2009  MIT-MAGIC-COOKIE-1  6f...f4

  And running:

  xterm xterm -display localhost:2009

  You will get the following error:

  Xlib: connection to "localhost:2009.0" refused by server
  Xlib: No protocol specified

  Adding also the unix cookie will fix it:

  xauth add localhost/unix:2009  MIT-MAGIC-COOKIE-1  6f...f4

  This seems to be a Xlib problem, with Xlib trying to get the cookie
  for the UDS port even if the TCP port was requested by the user.

- Fixed a bug that prevented the nxclient dialog to be displayed when
  the session was abruptedly shut down.

- Fixed the compilation error on Apple MacOSX due to the sa_restorer
  field in sigaction. As long as this field is present on Linux we
  will keep following the safer route and will set it explicitly to
  NULL.

- Included what needs to be included in Process.cpp to compile with
  older gcc.

nxcomp-1.5.0-12

- Implemented a replacement for the popen() and pclose() that do not
  rely on a shell to run the command. They were required on Windows,
  where we don't ship a suitable shell in the install.

- Removed code forcing the PATH to include the bin directory on
  Windows.

nxcomp-1.5.0-11

- Forced Auth.cpp on Windows to have the directory containing the
  nxauth executable in the PATH. This is just for testing, until
  nxclient is fixed.

- Fixed compilation errors on Cygwin and Sun.

- Removed the NX_FORCE_* stubs.

nxcomp-1.5.0-10

- Modified the memory management policies in ReadBuffer to fit all
  the available bytes in a single buffer allocation.

- The locateMessage() methods now give hints on the amount of data
  that has to be read.

- The read loop in channel now doesn't yield in the case of prio-
  ritized messages. This is experimental.

- Removed the check on isTimeToYield() between encodings of multi-
  ple messages. This is aimed at reducing the risk of leaving pen-
  ding messages in channels.

- Modified the channels' read loop to always read all the available
  data.

- Disabled the log output that was selected when compiling with the
  configure option --with-info. This leaves space for other log out-
  put to be selected for more up-to-date scopes.

- Implemented the NXTransReadVector() and the NXTransWriteVector()
  functions to replace READV() and WRITEV().

- Implemented memory-to-memory communication between the agent and
  the NX proxy by making use of the NXTransAgent() interface in the
  nx-X11/lib/X11/Xtranssock.c file.

- Added a check in NXTransSelect() for the EBADF and, on Solaris,
  the EINVAL errors. It can happen in the X11 code that a descript-
  or has become invalid before it is removed from the managed set 

- Rewritten the signal handling functions to restore the old actions
  and masks when the NX transport is destroyed.

- Added a NXTransAgent() function to let agents tell the proxy which
  descriptor must be used for the controlling connection. Setting a
  controlling connection has the effect of disabling further X client
  connections and makes the proxy terminate when the channel is shut
  down.

- Solved a problem with setting the initial timeout in the select().

- Modified the Makefile.in to not include -Wno-deprecated when compi-
  ling C programs.

nxcomp-1.5.0-9

- Fixed a problem that prevented the 1.5.0-8 to work on the NX server
  side.

- This version has NX_FORCE_NULL_LISTEN_OPTION and NX_FORCE_NEW_SES-
  SION_OPTION undefined, so it should work in a way that is compati-
  ble with the old nxcomp.

nxcomp-1.5.0-8

- The new code comes with a preliminary integration of nxcomp with
  SSH. It is now possible to create the NX transport by just calling
  the "switch" command as in the following example:

  NX> 299 Switching connection to: NX options: ...

- Other possible forms for the NX switch command are:

  NX> 299 Switching connection to: NX mode: ...

  NX> 299 Switching connection to: NX mode: ... options: ...

  Or just:

  NX> 299 Switching connection to: NX

  The "mode" parameter is there to provide a way to run both enc-
  rypted and unencrypted connections. Possible values are "encrypt-
  ed", "unencrypted" or "default", the latter being an alias for
  "encrypted". Unfortunately I was not able to test unencrypted
  connections, so this may or may not work.

- The top-level process can create the NX transport layer by calling
  NXTransCreate(). The user has to set up a socket pair and pass the
  higher descriptor to nxcomp. nxcomp will later monitor its end, by
  reading and writing NX-encoded traffic. The user has to call the
  NXTransExecute() function as often as it is possible, by letting
  first NXTransPrepare() combine the sets of NX descriptors with the
  descriptors that are used inside its process. A custom NXTransSel-
  ect() is provided to optionally replace the original select(). This
  function saves the original error code and the number of selected
  descriptors upon exit, so the user can call it, restore the original
  values as they were returned by the select() and run the rest of
  the loop unmodified.

- Future versions of the library should provide appropriate methods
  for passing data to and from the proxy by means of a memcpy(), so
  that it will be possible to remove the even minimal TCP overhead.

- Note that integration is far from complete. More work is required
  especially to manage the shutdown cleanly, in a way that gives to
  SSH a chance to free its resources, and on adding facilities for
  handling SSH and NX signals in a single function.

- Rewritten the initialization procedure to make possible to run the
  proxy in-process in an arbitrary connection manager, like SSH or a
  HTTP utility. The same functionality can be used to embed nxcomp in
  the NX agents, so that nxcomp has not to run in a separate process.

- A new state-machine handles the advances through the connection
  stages until the remote proxy (or the forwarder process ) is auth-
  enticated, options have been negotiated and the session is started.

- The option "session" is now used to pass the name of the session
  file to the proxy. The parameter was previously used to pass the
  literal name of the session, as set by the user, and was ignored
  by the proxy. By default the session log is the standard error of
  the process. It is anyway required to set the option when running
  inside SSH, otherwise output will go to the same file as the SSH
  output. In the NX client this would be the 'sshlog' file.

- This version can be easily crafted to test the new integration by
  setting the following define:

  NX_FORCE_NULL_LISTEN_OPTION

  This makes possible to test the nxcomp/nxssh integration by using
  any production 1.4.0 client. To run this version you are required
  to use nxproxy 1.5.0-4 and nxssh-1.5.0-6.

- New functions handling enabling and disabling signals, based on
  sigprocmask().

- Improved error reporting when failures are encountered while ne-
  gotiating the session.

nxcomp-1.5.0-7

- Caches are saved with a version identifier 1.4.0 so that they are
  not discarded after upgrading the software to the 1.5.0.

- Made values of T_* enumerations to be all lower case.

- Updated copyright to year 2005.

- Started working on an interface for running nxcomp in-process, as
  a additional transport layer of nxssh or nxagent.

nxcomp-1.5.0-6

- Modified the configure script and the makefiles to not include the
  -Wstrict-prototypes and -Wmissing-prototypes compilation flags. The
  -Wnested-externs and -Wmissing-declarations flags are not included
  when using GCC 3.

- Removed the initial newline from string "NXPROXY - Version" printed
  at program startup.
  
- Made X authentication compatible with 1.4.0 clients. This is a tem-
  porary solution while code is updated to handle the new X authori-
  zation scheme.

nxcomp-1.5.0-5

- Added an Auth class to handle the X authentication. The NX server
  should now use the same proxie cookie that is passed by the client
  at session startup. The X server side proxy will forward the autho-
  rization credentials by replacing the fake cookie with the real co-
  okie, as it is read from the auth file using the xauth utility. The
  implementation is based on the corresponding code found in the SSH
  client and comes with the same limitations: only MIT-MAGIC-COOKIE-1
  cookies are checked and the authorization file is read only once,
  at the time the instance is initialized. If the auth file changes
  along the life of the session, the old cookie will still be used.
  This works with X servers because of an undocumented "feature".
  See also nx-X11.

nxcomp-1.5.0-4

- Adjusted for alarm(0) returning an inconsistent value in ConnectTo-
  Remote().

- Small changes to Types.h, Jpeg.cpp and Png.cpp to compile with gcc
  3.4.2.

- Cosmetic changes to the ChangeLog file.

nxcomp-1.5.0-3

- Removed test code from ServerChannel.cpp.

- Small cosmetic change in Loop.cpp.

- Tested for compatibility against 1.4.1-8.

nxcomp-1.5.0-2

- Changed VERSION file according to TRCL052336.

nxcomp-1.5.0-1

- Opened the 1.5.0 branch based on 1.4.1-9.

nxcomp-1.4.1-9

- Implemented methods PACK_RDP_PLAIN_64K_COLORS and PACK_RDP_PLAIN_-
  16M_COLORS. It seems that 16 bpp plain bitmaps can be seldom recei-
  ved. This doesn't seem to be the case of 24 bpp bitmaps.

nxcomp-1.4.1-8

- The new code enables use of 16 bpp and 32 bpp RDP bitmaps. This re-
  quired modifications to the following files:

  Misc.h
  Misc.cpp
  Loop.cpp
  Control.cpp
  ServerChannel.cpp
  Unpack.h
  Unpack.cpp

- Lots of cosmetic changes compared to the original code in 1.4.1-7.

- Merged the 1.4.0 and the 1.4.1 branches by importing changes up to
  the 1.4.1-7.

nxcomp-1.4.0-30

- Modified the function checking the Unix socket where X connections
  will be forwarded. The function will not fail if the socket itself
  doesn't exist yet. This solves the TRCL042203.

- Moved the code checking for the CTRL+ALT+SHIFT+ESC sequence to a
  separate function. The implementation will now look for a different
  sequence on the MacOS/X platform. This should solve the TRCL042182.

nxcomp-1.4.0-29

- Solved a bug that could cause proxy to stop reading data from the
  X channels due to an incorrect calculation of the bytes queued on
  the proxy link. The bug only affected Linux kernels of the 2.0/2.2
  series.

- Fixed a problem in the proxy class that could let the select time-
  out to become zero.

nxcomp-1.4.0-28

- Prevented the main proxy process from quitting when the fork() of
  any of the children fails. This can actually happen on Windows due
  to conflicts in reallocating any of the Cygwin DLLs.

- Reworked handling of the priority flag in channels when dealing
  with the X_InternAtoms and X_AllocColor requests to reduce the time
  of session startup. Priority is never set in case of X_InternAtom
  requests and replies as we assume that most clients use the appro-
  priate Xlib function to pipeline multiple requests in a single net-
  work operation.

- The timeout after which proxy will abort the peer connection is
  still 120 seconds. An alert dialog will be shown earlier, after 30
  seconds instead of 60.

nxcomp-1.4.0-27

- Removed the code setting priority on channels on ButtonPress and
  Button release events. It seems preferrable to delay the flush and
  pack more events in a single frame. This makes possible to get the
  ButtonRelease together with the ButtonPress.

- Fixed error detection in SetNoDelay() where a positive result
  could produce a 'not supported' message in debug mode.

nxcomp-1.4.0-26

- Reworked the check aimed at detecting the clock drifts. The previ-
  ous code, introduced in 1.3.2-2, had the undesired side-effect of
  resetting the proxy timeout. This could cause the proxy to never
  detect that the other end had been killed.

- The default behaviour of proxy is now to terminate the session at
  the time an error is encountered. This includes network failures.

- Added a new dialog to be shown to the user whenever the session
  is terminated abnormally.

nxcomp-1.4.0-25

- Fixed a bug in handling of suppression of errors generated by
  committing the image splits. Other errors, unrelated to the commit
  of split, could be suppressed. This might cause the hangup of the
  session when the suppressed error was matching a reply.

nxcomp-1.4.0-24

- When killing the proxy process -9 the watchdog could remain alive.
  This caused the SSH link to keep the stderr open, with the effect
  that former proxy message were not flushed to the session log.
  Now the watchdog checks every second if the parent is dead, so
  that file descriptors can be closed as soon as possible.

- SetupDisplaySocket() tried to force the connections to the X
  server on the UNIX port whenever the display was set to localhost.
  This patch was intended to fix a bug in nxclient, using the TCP
  port even when the display was set to a UNIX socket. This beha-
  viour caused problems when running nxclient on a remote host by
  means of a ssh -X. Proxy will now adhere to the display setting.

nxcomp-1.4.0-23

- Added the possibility to respawn nxclient at the end of session.
  This is an useful feature when powering thin-clients where NX
  is the only application made available.

- This configuration applies system-wide to the local client ins-
  tallation. By default it is disabled. It can be enabled by the
  by creating a 'noexit' file in the directory '/usr/NX/share',
  or at compile time, by setting ENABLE_RESTART_ON_SHUTDOWN to 1.

- Note that the solution is not perfect yet, as there are cases
  where session could die without going through HandleShutdown(),
  for example if a decoding error is raised in the communication
  with the remote peer and the subsequent restore of the proxy
  link fails to succeed.

nxcomp-1.4.0-22

- Corrected typos in Timestamp.h and Loop.cpp.

nxcomp-1.4.0-21

- Tuned the handling of RenderCompositeGlyphs. Now compression of
  RENDER shows an average ratio of 8:1. This is a steady increase
  compared to the 5:1 of the 1.3.2 version. The overall advantage
  when running clients displaying a large amount of text is 30%.

nxcomp-1.4.0-20

- Added a new message store for the CreatePixmap request.

- Fixed handleCopy() to only send the data part past the offset.
  This fix can save a significant amount of traffic, especially
  when sending many small images whose size doesn't reach the
  threshold set for compressing them.

nxcomp-1.4.0-19

- Added tuning of all the RENDER requests. RenderCompositeGlyphs
  will require further work.

- Completed porting of the RENDER requests to the new templates.

nxcomp-1.4.0-18

- Tuned the handling of RenderCreatePicture and RenderFreePicture.

- Created a new template system for writing new message encoders.

- Renamed getBits() in EncodeBuffer with diffBits(). The getBits()
  method now returns the bits actually allocated in the buffer and
  can be called multiple times.

nxcomp-1.4.0-17

- Provided specific encoding of the remaining RENDER requests and
  added compression of RenderCreateGlyphSet.

nxcomp-1.4.0-16

- Code underwent through 7 different patch versions but seems to
  be stable now. It still needs to provide specific encoding for
  RenderCreatePicture RenderChangePicture and RenderFreePicture.
  Code will likely include incompatible changes at any new version
  until the new encoding will stabilize, so be sure that you use
  the same nxcomp version at both sides.

- Created the infrastructure for compressing extension messages
  based on the minor opcode. A new class, MinorMessageStore, has
  to be inherited by stores requiring specific compression, so
  that all the encoding methods of the parent can be redirected
  to it. The RENDER extension is now compressed using this new
  class.

- Managed to maintain the compatibility with caches created by the
  1.3.X version. Caches will be saved using the old format if the
  remote version is not a 1.4.x. When restoring a cache created
  by the 1.3.x with both proxies being the newest version, RENDER
  mesages will be discarded without having to discard the whole
  cache.

- Added a member to the message class to store the identity size.
  This field is now used instead of the default data offset to
  manage the message data, that is the part of message after the
  identity.

- Removed the warnings printed in the session log when passing the
  'kbtype' and the 'geometry' options to the proxy. These options
  are actually used by agents.

nxcomp-1.4.0-15

- Started implementation of the new framework for handling enco-
  ding of X extensions.

- Renamed the overloaded methods handleEncode() and handleDecode()
  to handleEncodeCached(), handleEncodeIdentity() and handleDecode-
  Cached(), handleDecodeIdentity().

- Updated the copyright notice to year 2004.

nxcomp-1.4.0-14

- Added the new channel for HTTP connections. This channel can be
  used to let applications running on the NX server get access to
  data and applications made available by a HTTP daemon running at
  the client side.

  This channel is not used at the moment by nxclient. It can be
  activated by passing http=1 to the NX server side proxy and the
  value http=80 to the NX client side.

nxcomp-1.4.0-13

- Quick patch to run on MacOS/X where inet_addr("127.0.0.1")
  alone seems to fail to return a valid interface.

nxcomp-1.4.0-12

- Few cosmetic changes to logging.

- Removed the debug output.

nxcomp-1.4.0-11

- Removed code used for simulating the new forwarding function-
  ality without client and server support.

nxcomp-1.4.0-10

- Implemented authentication of the forwarder to the listening
  proxy. If a session cookie is required, the forwarder must
  provide the cookie upon connection.

  An authentication phase at the time the forwarder connects
  to the NX client side is strongly suggested because it is usu-
  ally this side that sends the authorization cookie. Without
  such a forwarder authentication, the local peer would reveal
  the cookie to the first process connecting to the port.

- If no cookie is specified in the switch command, the forward-
  er is required to skip the authentication phase. This can be
  useful when running the programs on the command line.

- The implementation required appropriate changes to session
  negotiation in nxssh. This version requires nxssh-1.4.0-8.

nxcomp-1.4.0-9

- Fixed the startup procedure to correctly negotiate the cookie
  when the X server side proxy is listening for a forwarder.

- When listening for a local forwarder (that is when the listen
  option is enabled at X server side), proxy will listen for the
  forwarder on the localhost interface.

- This version has ports and and other parameters hardcoded for
  testing purposes and is not intended for normal use.

nxcomp-1.4.0-8

- Slightly modified the text of FAILED_PROXY_CONNECTION alert.

nxcomp-1.4.0-7

- Added provision for leaving a running dialog showing an OK box
  if proxy is exiting abnormally. This seems to fail to yield the
  expected results as, at the present moment, client checks if
  parent has exited.

- Added a Binder class invoked when calling proxy with -B option.
  It would serve as a replacement of the modifications I'm doing
  in nxssh. The class is just a framework and the implementation
  is unfinished.

nxcomp-1.4.0-6

- Added a line in the session log if the connection procedure is
  aborted due to a signal.

- Fixed ParseHostOption() to let it take in account the proxy
  port offset when passing 'host:port' as the last parameter at
  X server side.

nxcomp-1.4.0-5

- Lowered the default port offsets used for CUPS and SMB services
  to 2000 and 3000. Arbitrary ports can be used by passing the ser-
  vice's port at proxy startup. By default, anyway, the port is at
  the same offset of the proxied display. Considering that the NX
  server uses to start the first session at display 1000, we must
  lower some of the defaults to avoid interference with the normal
  X sessions run on the server.

  Session at display ":1000" will have:

  . Forwarding of CUPS connections at 3000.

  . Forwarding of SMB connections at 4000.

  . The listening proxy (at NX server side) at 5000. This
    port is not used when enabling SSH tunneling

  . The proxied X display (NX agent or proxy) at 7000.

  . Forwarding of multimedia channels at 8000.

  . Forwarding of embedded keyboard connections at 9000.

- Turned off the log output.

nxcomp-1.4.0-4

- Managed to get the X client side proxy connect to the remote
  peer. This means that some parameters that were implicitly
  assumed based on the proxied port simulating the X display
  must be now specified in the NX display string.

- The 'port' parameter now specifies the remote TCP port where
  the local proxy will connect to the remote peer. In previous
  versions this parameter also affected the proxied port. This
  was mainly a side effect, as the remote peer was always con-
  tacted at port 4000 plus the proxied display offset.

- Added the 'listen' parameter to tell to the proxy that is go-
  ing to accept the peer connection on which port it will be
  contacted. By default, similarly to the previous version, the
  proxy will listen at the proxied display offset.

- A check has been added in order to disallow passing both the
  'accept' and the 'connect' parameter at the same time. A simi-
  lar check affects the 'listen' parameter.

- Renamed the previously unused 'sync' channel as 'cups'.

nxcomp-1.4.0-3

- Preserved the ability of version 1.3.2 to load caches generated
  by this version.

nxcomp-1.4.0-2

- Small fixes to compile under Solaris 8.

nxcomp-1.4.0-1

- Opened the 1.4.0 branch.

nxcomp-1.3.2-4

- Fixed a problem with shmget(). Code in ServerChannel checked
  the return value for being greater then 0, while 0 can actual-
  ly be a valid segment.

- When memory cache is disabled, nxcomp will explicitly set the
  appropriate control variables dealing with loading and saving
  of the persistent cache. This can be considered a cosmetic
  change as nxcomp will disable NX delta compression if memory
  cache is not available and this has an implicit effect on the
  ability to load and save such a cache.

nxcomp-1.3.2-3

- Removed inclusion of zlib.h in Png.cpp. Conflicting symbols
  with zlib.h from nx-X11 could cause compilation to fail.

nxcomp-1.3.2-2

- Added a function to take into account the clock drifts at the
  time we check the ping from the remote proxy. This can be
  caused by the user changing the system time or by small adjust-
  ments introduced by the operating system making the clock go
  backward. Such events could cause the proxy link to be shut
  down and reconnected.

- Reduced the length of lines printed in statistics when showing
  the details of X protocol's opcodes. This is intended to help
  nxclient to keep the whole statistics in the 'details' window,
  so that users don't have to use the scrollbars.

nxcomp-1.3.2-1

- Opened the 1.3.2 branch.

nxcomp-1.3.1-5

- It seems that Solaris can return an EINVAL error selecting a
  shutdown descriptor even before we actually close the socket.
  We now ignore the condition on Solaris. This is definitely a
  Solaris bug. 

nxcomp-1.3.1-4

- Increased the timeout after which proxy will abort the peer
  connection to 120 seconds. An alert dialog will now be shown
  after 60 seconds, instead of the 30 seconds being the default
  in the previous version. Some users reported the timeout to
  be too short in the case of temporary network failures.

nxcomp-1.3.1-3

- Some optimizations in the cache house-keeping process. Now it
  runs at lower system priority in respect to the parent. Any 2
  iterations through directories and images, it also sleeps for
  a tiny amount of time. This further decreases the system load.

- Removed the underline characters and added a colon in the
  title of this ChangeLog to fully comply with format used in
  the release notices.

nxcomp-1.3.1-2

- Fixed a crash when running both client and server on the SPARC
  Solaris. An optimization used to avoid byte-swapping when both
  hosts have the same endianess doesn't work on SPARC if buffer
  is not aligned to word boundary. A better version of the code
  should check the CPU, not the OS, as this probably applies to
  other processors.

nxcomp-1.3.1-1

- Opened the 1.3.1 branch.

nxcomp-1.3.0-50

- Disabled the processor limit in X client side proxy. In previous
  versions the processor load limit was set to an idle time ratio
  of 2. This was likely to cause an unwanted slowdown on very old
  hardware or when running the server as guest OS inside a VMWare
  virtual machine.

nxcomp-1.3.0-49

- Last minute update on proxy shutdown bug on Cygwin. A stack
  trace reveals that faillure happens in the static destructor of
  the BlockCacheSet class. It seems that problem appeared just
  after having upgraded to the latest version of Cygwin DLL. Now
  the destructor is skipped at shutdown.

nxcomp-1.3.0-48

- Further fix to overcome the shutdown problem on Windows.

nxcomp-1.3.0-47

- Used T_files::value_type() in Keeper.cpp. The form without the
  explicit constructor fails to compile with GCC 2.91 on RH 6.2.

- Fixed '==' -> '=' in configure.in to build under RH 6.2 and
  probably other platforms.

nxcomp-1.3.0-46

- The cleanup procedure now skips deletion of the IO streams
  under Windows. This is intended to overcome a strange segfault
  occurring at random time, at the time proxy is being shutdown.

nxcomp-1.3.0-45

- Newer versions of the stdlibc++ do not seem to be able to deal
  with NULL strings or non printable characters. This caused the
  standard error stream to get sometimes corrupted in the case
  TEST and DEBUG logs were enabled in Loop.cpp.

nxcomp-1.3.0-44

- Disabled TEST and DEBUG logs in ServerChannel.

nxcomp-1.3.0-43

- Fixed a crash when unpacking an image in server proxy in the
  case the unpack state for the given channel had not been
  previously created.

nxcomp-1.3.0-42

- Small modification to setSchedule() to not account previous
  data accumulated in the encode buffer. The new code seems to
  allow better use of the available bandwidth.

nxcomp-1.3.0-41

- Further fix in Tight decompression. Content of the main write
  buffer was not removed before flushing the unpacked data to
  the X server link.

nxcomp-1.3.0-40

- Removed the code marked as FIXME in Loop and ServerChannel.
  Code was used in previous version to override any pack method
  other than NO_PACK and to disable initialization of the shared
  memory.

nxcomp-1.3.0-39

- Solved the problem with unpacking of RDP text on big-endian
  architectures. The width field in PutPackedImage was put as
  16 bits and extracted as 32 bits at decoding side.

- Moved the code checking if any of the children has exited in a
  specific function. This function is now called any time signals
  are newly enabled. This works even on Solaris.

- Enabled use of shared memory with Tight image decompression.

- Added event NXCollectPropertyNotify to NXproto.h.

nxcomp-1.3.0-38

- Message locks are now checked before splitting a message.

nxcomp-1.3.0-37

- Added a further counter to yield encoding data if the amount 
  of output bytes to be written to channels exceeds a threshold.

- Modified proxy to write data immediately if the encoding loop
  was interrupted.

nxcomp-1.3.0-36

- Further fix required by Tight decompression. By handling mul-
  tiple writes in the Tight class we may flush the main write
  buffer in the wrong order. If Tight decompression is enabled,
  the buffer is now flushed before decoding the packed image.

- A SIGCHLD is raised any time signals are newly enabled. This
  allows the main loop to wait() the pid of children that had
  exited while signals were disabled.

nxcomp-1.3.0-35

- Fixed Tight decompression by handling multiple writes to the
  channel's transport inside the decompression function.

- Made Tight decompressor in ServerChannel a pointer instead of
  an instance of the class. Class is allocated the first time it
  is referenced.

- Rewritten handleUnpack() in ServerChannel to use a switch()
  on the pack method instead of multiple if().

nxcomp-1.3.0-34

- Disabled RENDER extension when running X agent sessions on
  the Solaris client. Problems seem to be caused by incompati-
  bilities in the implementation of RENDER on the Sun X server
  shipped by default. We did not test NX with the XFree86 X
  server, but it seems that, when using the Sun X server, even
  plain X clients don't make full use of the extension.

nxcomp-1.3.0-33

- Added 4 new fields to the X_NXGetControlParameters reply.
  A dialog should be shown by agent if proxy was not able to
  negotiate a persistent cache or if a cache was selected but
  not loaded because incompatible or corrupted.

- Fixed a bug on Solaris where socket() must be recreated if
  the first connect() fails. Not a problem. The strange thing
  is that if you reuse the socket(), the subsequent connect()
  is successful and the program fails as soon as you try to
  write to it.

nxcomp-1.3.0-32

- Added request X_NXFreeUnpack to free the resources allocated
  by the remote proxy to unpack images for the given agent's
  client

- Added an alert at X server side if proxies were not able to
  negotiate a persistent cache or if a cache was selected but
  not loaded at X server side (that means that probably cache
  was not compatible or corrupted). The alert is not enabled
  at the moment. Before enabling it, we need to find a way to
  deal with full-screen mode.

- Tuning of MIT-SHM parameters.

nxcomp-1.3.0-31

- Modified the following requests to carry the id of the
  agent's client:

  - X_NXSetUnpackGeometry
  - X_NXSetUnpackColormap
  - X_NXSetUnpackAlpha
  - X_NXPutPackedImage

  Now each agent's client has its own record pointing to the
  geometry, colormap and alpha channel that will be used to
  unpack the image. Code is not finished yet so it is advisable
  that agents' writers keep using client id 0. Note also that
  the final solution will require some changes to the way split
  notifications are sent to agent that I plan to implement in
  the next versions.

- The X_NXSetUnpackGeometry request has now a message store.
  This should reduce the overhead to the minimum even in the
  case of dumb agents not checking if the current geometry
  matches the image to be unpacked.

nxcomp-1.3.0-30

- Improved handling of short-circuited replies at X client
  side. Request opcodes are now pushed in the sequence queue
  to determine if a reply is expected. In this case tainting
  of reply is skipped to preserve the sequence ordering of
  any event or error that could have generated by the reply.
  This seems to solve all the problems reported by people
  running a NX session in virtual desktop mode nested in an
  existing session being run in single application mode.

- Modified the cleanup procedure to print the 'Waiting for'
  message in the session log only at the time all X channels
  have been actually shut down. This message can be used by
  the NX server to find out the appropriate time to close
  the session.

- Added the selected session type to the 'Using pack method'
  message printed at startup.

- Added the option to close down the proxy link and perform
  a clean shutdown of the session, re-read the whole session
  configuration or restart the proxy link when a SIGHUP is
  delivered to the proxy process. The default behaviour is
  to close down the session. The new default (the old one was
  to restart the link) is a required feature to let users run
  full sessions using single application mode f.e. in a LTSP
  environment. I noted that when the controlling terminal of
  the X session is closed, a SIGHUP is delivered to the X
  server side proxy (probably it is delivered to all the con-
  nected clients, and, thus for NX, only to the proxy). This
  signal can be used to terminate the whole session.

nxcomp-1.3.0-29

- Changed defaults to disable image masks when running proxy
  in single application mode. The new configuration requires
  changes in NX server and in NX X11 library. Users should
  experience much better image quality when using NX on slow
  links. This comes at the cost of slightly worse compression
  ratios.

nxcomp-1.3.0-28

- Opcode of request was not rewritten by server channel when
  using link LAN. This caused problems with taint of replies.

nxcomp-1.3.0-27

- Modified the split store and the split procedures in client
  channel to always return the client id in the notification
  events. The new field is added to event at byte offset 28
  to preserve compatibility with previous agent releases. The
  modification permits to agent to match the commit of alpha
  channel with the original image, if requests are split by
  proxy.

- Temporarily set the timeout used to poll MIT-SHM completion
  events coming from X server to 0. More testing is required.

- Fixed an inconsistent message generated in statistics due to
  a division by 0.

nxcomp-1.3.0-26

- Modified pending timeout from 1 to 0 milliseconds. This means
  that both channels and proxy are now immediately restarted to
  let them consume all data left in their read buffer.

- When querying the X server for MIT-SHM support, size of name
  in X_QueryExtension request was sent as 32 bits instead of 16.
  This caused request to fail on big endian architectures.

- Modified the MIT-SHM initialization procedure to always send
  all the 3 protocol requests also in the case of early failures.

nxcomp-1.3.0-25

- Implemented handling of the new X_NXSetUnpackAlpha message.
  Performances are very satisfactory. Using most of the current
  GNOME and KDE applications, caching reaches 90% of the total
  messages.

- Modified the persistent cache management routines to handle
  backward compatibility with proxy versions prior of 1.3.0.

- It has been made possible to send both X_NXSetUnpackColormap
  and X_NXSetUnpackAlpha messages with 0 entries to temporarily
  disable use of the colormap or the alpha channel and free the
  resources allocated by the server channel class.

- Added function UnpackAlpha() to Unpack.cpp.

nxcomp-1.3.0-24

- Using WriteBuffer::registerPointer() to track growing of the
  write buffer in handleFastWrite() functions. This problem
  existed even in 1.2.2 but never shown up because we didn't
  have to use the pointer after data had been written to the
  write buffer. Now, instead, we have to post-process the write
  buffer to copy data to the shared segment.

- Optimized memory allocations running with link LAN to save a
  memcpy() any time new data is allocated in the scratch buffer.

- When running with link LAN the scratch buffer is now used only
  when:

  - A further allocation would case growing of the write buffer
    (and, thus, a memcpy() of the previous content).

  - When data to added is bigger than the write threshold.

  In previous versions the scratch buffer was used any time the 
  total amount of data to be written (write buffer + scratch
  buffer) exceeded the scheduled write threshold. This caused
  small writes to be appended even when a single write could
  be  obtained without reallocating the buffer.

- Preliminary support for transporting the alpha channel in a
  separate message in case of 32 bits displays using the RENDER
  extension.

nxcomp-1.3.0-23

- Modified the mask used to open the shared memory segment on
  OS/X to 0777. We have to better investigate why the previous
  0600 mask doesn't work even if the user running the proxy is
  the same user running the X server.

nxcomp-1.3.0-22

- Implemented MIT-SHM support on LAN connections.

- More MIT-SHM bug fixes.

nxcomp-1.3.0-21

- Better use of the shared segment through an improved
  algorythm leveraging the offset field of the X_ShmPutImage
  request. The new algorythm greatly reduces the amount of
  polls the proxy needs to perform to find if the completion
  event has arrived.

- Implemented MIT-SHM support for X_PutImage requests.

- Implemented option shmem=value. Use of this option is anyway
  discouraged. Proxy will allocate the shared memory segment
  based on the size of the in-memory cache set by the user.
  Use of MIT-SHM is disabled when user did set a memory cache
  smaller than 2MB (for example on the embedded client).

- Rewritten post-processing of images in server channel loop.

- Improved error handling to ensure we intercept all MIT-SHM
  X errors before they reach the NX agent.

- Solved a problem that was causing channels to not reflect
  shared memory support flags set in control.

nxcomp-1.3.0-20

- Solved a compatibility problem when mixing proxy versions
  1.2.2 and 1.3.0.

nxcomp-1.3.0-18

- Rewritten interfaces to shared memory initialization in
  client and server channel.

- Server channel checks for the completion event until a
  timeout before reusing the shared memory segment.

- Flush flag was not cleared after the write buffer had been
  flushed in handleWrite() of both client and server channels.
  This could lead to multiple fragmented writes, affecting
  the performances.

- Added -lcygipc to linking on Windows platform.

- Added a check on GCC version to see if -Wnested-externs
  -Wmissing-declarations are valid options.

nxcomp-1.3.0-17

- Implemented initial support for MIT-SHM extension in the
  network path between the X server proxy and the real X
  server. Presently it works only for X_NXPutPackedImages.

- Modified configure.in to compile under FreeBSD.

- Small changes to sources due to FreeBSD support.

nxcomp-1.3.0-16

- Fixed caching of RENDER extension on MacOS/X and Solaris.

- Under Solaris an explicit call to EnableSignal() is needed
  at the end of the signal handler as raising a signal seems
  to reset the previous settings.

- Can't find a way to get bytes queued for write on Solaris as
  both FIONWRITE and TIOCOUTQ don't seem to be available. This
  means that NX server on Solaris is only able to detect con-
  gestions on proxy link at the time a write fails with error
  EAGAIN.

- Starting from this version, render extension messages are not
  automatically discarded from cache when running agent based X
  sessions. This is in preparation of render support introduced
  in this release.

nxcomp-1.3.0-15

- Changed default to force writes if X channels exceed buffer
  limits. This change was suggested by benchmarks performed on
  Win32.

- Wrapped IO on cache files in functions performing better error
  checking.

- General cleanup in handling of socket options for MacOS/X and
  Solaris.

nxcomp-1.3.0-14

- Corrupted persistent caches were not deleted in case loading
  of any of the message stores failed. To run further sessions
  on the same host, user had to delete the cache file manually.

- Improved error handling in JPEG decompression. Now connection
  is reset in case of failure.

- Before performing JPEG or PNG decompression, image is better
  checked to verify if loading from disk failed.

- Improved error handling in case of failure loading persistent
  cache from disk. On MacOS/X istream -> fail() doesn't seem to
  work properly. This needs further investigation.

- The default installation path of nxclient is searched under
  MacOS/X at the time nxclient is invoked in dialog mode.

nxcomp-1.3.0-13

- Fixed a (further) compilation problem under Solaris. Now static
  libraries are first searched under /usr/sfw/lib (in case Sun
  would decide to include them in future releases).

nxcomp-1.3.0-12

- Fixed parsing of command line when passing option -V.

- Correctly detected ENOPROTOOPT when setting TCP_NODELAY socket
  option on MacOS/X and Solaris.

nxcomp-1.3.0-11

- Given option in configure to specify what needs to be built
  statically:

  --with-static-png     enable static linking of PNG library
  --with-static-jpeg    enable static linking of JPEG library
  --with-static-z       enable static linking of Z library

nxcomp-1.3.0-10

- Fixed a problem in saving of persistent cache on big-endian
  machines.

nxcomp-1.3.0-9

- Testing with different settings to check if it's possible to
  increase the performances under Windows.

- Solved a problem in parsing of options that prevented proxy
  to connect to a remote session running at port offset 0.

- Fixed two warnings compiling on Solaris.

- Changed configure.in to first check for nx-X11 includes
  and libraries. Added "/usr/openwin/bin/makedepend" to path
  searched for the executable.

nxcomp-1.3.0-8

- Small cleanup in configure.in and files modified by Gregorz
  Kryza to add support for Solaris.

- A new configure script has been generated using autoconf-2.57-3.

nxcomp-1.3.0-7

- Added support for detection of Solaris in configure script.
  Now Makefile.in uses ranlib instead of ar.

- Small changes in source and header files to support Solaris.

nxcomp-1.3.0-4

- Corrected a bug that could cause priority on proxy and channels 
  to be not taken in account at the time proxy tries to determine 
  if it's time to flush the proxy link.

- Better implementation of abort split notification by X server
  proxy to its remote peer. The new implementation doesn't
  need to set a timeout and permits notifications to be received
  earlier.

- Improved support for 'tainting' XSync() messages coming from 
  X clients in single application mode. Now a X_GetInputFocus
  is sent to the real X server any n such messages received by
  proxy. 

- Included support for 15 bpp displays. It seems that handling
  them as 16 bpp it's OK.
