ChangeLog:

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 on 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 showed
  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 showed 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 showed 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.
